aboutsummaryrefslogtreecommitdiffstats
path: root/bootstraptest/test_method.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest/test_method.rb')
-rw-r--r--bootstraptest/test_method.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index bca80087bb..81d90041b7 100644
--- a/bootstraptest/test_method.rb
+++ b/bootstraptest/test_method.rb
@@ -957,3 +957,29 @@ assert_equal 'ok', %q{
end
}, '[ruby-core:11998]'
+assert_equal 'ok', %q{
+ class B
+ def m() :fail end
+ end
+ class C < B
+ undef m
+ begin
+ remove_method :m
+ rescue NameError
+ end
+ end
+ begin
+ C.new.m
+ rescue NameError
+ :ok
+ end
+}, '[ruby-dev:31816], [ruby-dev:31817]'
+
+assert_equal 'ok', %q{
+ Process.setrlimit(Process::RLIMIT_STACK, 1024*1024)
+ class C
+ attr "a" * (2*1024*1024)
+ end
+ :ok
+}, '[ruby-dev:31818]'
+