summaryrefslogtreecommitdiff
path: root/test/ruby/test_syntax.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-13 18:44:33 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-13 21:51:34 +0900
commit67bcac879a2e0ddfb4e7bbd7cb5e5401422de76a (patch)
treebb20963fbf8158a8f6b1e7b6b8a9d4dc07d4772f /test/ruby/test_syntax.rb
parent5dc6080cb8bebdc7109bd6048e28aee656c3bb4f (diff)
Allow simple R-assign in endless def
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3025
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r--test/ruby/test_syntax.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 29813cebd5..b0d9e82f28 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -1419,6 +1419,7 @@ eom
assert_valid_syntax('private def inc(x) = x + 1')
assert_valid_syntax('private def obj.foo = 42')
assert_valid_syntax('private def obj.inc(x) = x + 1')
+ assert_valid_syntax('private def obj.inc(x) = x + 1 => @x')
end
def test_methoddef_in_cond