mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Warn when passing a non-literal block to Kernel#lambda
Implements [Feature #15973]
This commit is contained in:
parent
5349506eb4
commit
2188d6d160
Notes:
git
2020-06-11 23:31:13 +09:00
4 changed files with 20 additions and 5 deletions
|
@ -1425,9 +1425,6 @@ marity_test(:test_ok)
|
|||
marity_test(:marity_test)
|
||||
marity_test(:p)
|
||||
|
||||
lambda(&method(:test_ok)).call(true)
|
||||
lambda(&block_get{|a,n| test_ok(a,n)}).call(true, 2)
|
||||
|
||||
class ITER_TEST1
|
||||
def a
|
||||
block_given?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue