From 60e85501f20d6992a4dbf0b1930e87cfdf642295 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 27 Jan 2014 12:53:48 +0000 Subject: thread_pthread.c: get current main thread stack size * thread_pthread.c: get current main thread stack size, which may be expanded than allocated size at initialization, by rlimit(). [ruby-core:60113] [Bug #9454] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_exception.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/ruby/test_exception.rb') diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index f15b37f8b9..32f97fa1aa 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -488,6 +488,16 @@ end.join rescue SystemStackError end + def test_machine_stackoverflow_by_define_method + bug9454 = '[ruby-core:60113] [Bug #9454]' + assert_separately([], <<-SRC) + assert_raise(SystemStackError, #{bug9454.dump}) { + define_method(:foo) {self.foo} + self.foo + } + SRC + end + def test_cause msg = "[Feature #8257]" cause = nil -- cgit v1.2.3