summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_exception.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index 4a0edc3f1a..b7b41db1cd 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -456,4 +456,13 @@ end.join
s = e.to_s
assert_equal(false, s.tainted?)
end
+
+ def m;
+ m &->{return 0};
+ 42;
+ end
+
+ def test_stackoverflow
+ assert_raise(SystemStackError){m}
+ end
end