diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-12-21 22:41:32 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-12-21 22:41:32 +0900 |
| commit | 06e09fc7a9e88b677ec2f7b2806975536c9a104d (patch) | |
| tree | 84fce725f6a452717872a3b96e08107048c257fd /test | |
| parent | 2fe78a0c7c4456496ce54a4dc4ed38d8ef1ce664 (diff) | |
| download | mruby-06e09fc7a9e88b677ec2f7b2806975536c9a104d.tar.gz mruby-06e09fc7a9e88b677ec2f7b2806975536c9a104d.zip | |
Numbered parameters should not be available in the lambda bodies.
`mruby` does not warn like `CRuby` for cases like #4893.
Fix #4890, fix #4891, fix #4893.
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/syntax.rb | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb index 4404de4d4..436c06601 100644 --- a/test/t/syntax.rb +++ b/test/t/syntax.rb @@ -674,9 +674,6 @@ end assert('numbered parameters') do assert_equal(15, [1,2,3,4,5].reduce {_1+_2}) - assert_equal(3, ->{_1+_2}.call(1,2)) - assert_equal(4, ->(a=->{_1}){a}.call.call(4)) - assert_equal(5, -> a: ->{_1} {a}.call.call(5)) assert_equal(45, Proc.new do _1 + _2 + _3 + _4 + _5 + _6 + _7 + _8 + _9 end.call(*[1, 2, 3, 4, 5, 6, 7, 8, 9])) end |
