diff --git a/spec/ruby/core/kernel/lambda_spec.rb b/spec/ruby/core/kernel/lambda_spec.rb index 537ac2628c6ca7..5c30511270b300 100644 --- a/spec/ruby/core/kernel/lambda_spec.rb +++ b/spec/ruby/core/kernel/lambda_spec.rb @@ -53,6 +53,13 @@ l.lambda?.should be_false end + it "does not create lambda-style Procs when captured with #method" do + kernel_lambda = method(:lambda) + l = kernel_lambda.call { 42 } + l.lambda?.should be_false + l.call(:extra).should == 42 + end + it "checks the arity of the call when no args are specified" do l = lambda { :called } l.call.should == :called