diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-01 08:17:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-01 08:17:37 +0000 |
commit | 19a352805e235b16c43a373073f63e47bf9ab12d (patch) | |
tree | 0d2c4b280c8b12a03e870cddca4b3c41d4cebca5 /test/ruby/test_object.rb | |
parent | e2b31d9a767f185bc90326a2348d1b57678dd6c0 (diff) | |
download | ruby-19a352805e235b16c43a373073f63e47bf9ab12d.tar.gz |
test_object.rb: use assert_separately
* test/ruby/test_object.rb (test_redef_method_missing): use
assert_separately to catch segfaults and show the diagnostic
reports.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_object.rb')
-rw-r--r-- | test/ruby/test_object.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index ad836fca8f..fac5302dab 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -807,18 +807,16 @@ class TestObject < Test::Unit::TestCase def test_redef_method_missing bug5473 = '[ruby-core:40287]' ['ArgumentError.new("bug5473")', 'ArgumentError, "bug5473"', '"bug5473"'].each do |code| - out, err, status = EnvUtil.invoke_ruby([], <<-SRC, true, true) + exc = code[/\A[A-Z]\w+/] || 'RuntimeError' + assert_separately([], <<-SRC) class ::Object def method_missing(m, *a, &b) raise #{code} end end - p((1.foo rescue $!)) + assert_raise_with_message(#{exc}, "bug5473") {1.foo} SRC - assert_send([status, :success?], bug5473) - assert_equal("", err, bug5473) - assert_equal((eval("raise #{code}") rescue $!.inspect), out.chomp, bug5473) end end |