diff options
author | Jeremy Evans <code@jeremyevans.net> | 2020-06-10 17:50:35 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2020-06-11 07:30:48 -0700 |
commit | 2188d6d160d3ba82432c87277310a4d417e136d5 (patch) | |
tree | f885cb534dc38c06db3431076719436563f96fb9 /test/ruby/test_iterator.rb | |
parent | 5349506eb4c0668fa1d6f512e4dae1021a9a7460 (diff) |
Warn when passing a non-literal block to Kernel#lambda
Implements [Feature #15973]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3209
Diffstat (limited to 'test/ruby/test_iterator.rb')
-rw-r--r-- | test/ruby/test_iterator.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/ruby/test_iterator.rb b/test/ruby/test_iterator.rb index 54c095338f..820d5591c1 100644 --- a/test/ruby/test_iterator.rb +++ b/test/ruby/test_iterator.rb @@ -339,8 +339,7 @@ class TestIterator < Test::Unit::TestCase marity_test(:marity_test) marity_test(:p) - lambda(&method(:assert)).call(true) - lambda(&get_block{|a,n| assert(a,n)}).call(true, "marity") + get_block{|a,n| assert(a,n)}.call(true, "marity") end def foo |