diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/envutil.rb | 6 | ||||
| -rw-r--r-- | test/ruby/test_method.rb | 13 |
2 files changed, 16 insertions, 3 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 02215120dd..77ecd522f2 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -244,9 +244,9 @@ module Test end def assert_ruby_status(args, test_stdin="", message=nil, opt={}) - _, _, status = EnvUtil.invoke_ruby(args, test_stdin, false, false, opt) - m = message ? "#{message} (#{status.inspect})" : "ruby exit status is not success: #{status.inspect}" - assert(status.success?, m) + out, _, status = EnvUtil.invoke_ruby(args, test_stdin, true, :merge_to_stdout, opt) + message ||= "ruby exit status is not success:" + assert(status.success?, FailDesc[status, message, out]) end ABORT_SIGNALS = Signal.list.values_at(*%w"ILL ABRT BUS SEGV") diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 23b348a94f..00f5658431 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -536,4 +536,17 @@ class TestMethod < Test::Unit::TestCase IRB.start }, '[Bug #7825]' end + + def test_unlinked_method_entry_in_method_object_bug + bug8100 = '[ruby-core:53640] [Bug #8100]' + assert_ruby_status [], %q{ + loop do + def x + "hello" * 1000 + end + method(:x).call + end + }, bug8100, timeout: 2 + rescue Timeout::Error + end end |
