aboutsummaryrefslogtreecommitdiffstats
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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_lambda.rb b/test/ruby/test_lambda.rb
index 826bfcf203..3ac2e4cb98 100644
--- a/test/ruby/test_lambda.rb
+++ b/test/ruby/test_lambda.rb
@@ -101,6 +101,12 @@ class TestLambdaParameters < Test::Unit::TestCase
assert_equal(:ok, x, bug13090)
end
+ def test_arity_error
+ assert_raise(ArgumentError, '[Bug #12705]') do
+ [1, 2].tap(&lambda {|a, b|})
+ end
+ end
+
def foo
assert_equal(nil, ->(&b){ b }.call)
end