summaryrefslogtreecommitdiff
path: root/test/ruby/test_lambda.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_lambda.rb')
-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 f61e8a9f62..597da8a819 100644
--- a/test/ruby/test_lambda.rb
+++ b/test/ruby/test_lambda.rb
@@ -72,6 +72,13 @@ class TestLambdaParameters < Test::Unit::TestCase
assert_raise(ArgumentError, bug9605) {proc(&plus).call [1,2]}
end
+ def test_instance_exec
+ bug12568 = '[ruby-core:76300] [Bug #12568]'
+ assert_nothing_raised(ArgumentError, bug12568) do
+ instance_exec([1,2,3], &->(a=[]){ a })
+ end
+ end
+
def yield_1(arg)
yield arg
end