Actions
Bug #12809
closedpassing a proc to Kernel#lambda does not create a lambda
Bug #12809:
passing a proc to Kernel#lambda does not create a lambda
Description
I would expect the following:
p = proc { |a| a * 2 }
l = lambda(&p)
puts l.lambda? # => true
l.call(1, 2) # => ArgumentError
But it does not, basically l there looks very much like a non-lambda proc (another test is that a return in p would cause l.call to raise LocalJumpError)
Actions