summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_lambda.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_lambda.rb b/test/ruby/test_lambda.rb
index 02bb26939d..ae12c6d609 100644
--- a/test/ruby/test_lambda.rb
+++ b/test/ruby/test_lambda.rb
@@ -63,4 +63,11 @@ class TestLambdaParameters < Test::Unit::TestCase
def foo
assert_equal(nil, ->(&b){ b }.call)
end
+
+ def test_in_basic_object
+ bug5966 = '[ruby-core:42349]'
+ called = false
+ BasicObject.new.instance_eval {->() {called = true}.()}
+ assert_equal(true, called, bug5966)
+ end
end