summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-01 08:17:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-01 08:17:37 +0000
commitc0e2f9278ee2649d98e6750a5e6bfc5d36b4db20 (patch)
tree0d2c4b280c8b12a03e870cddca4b3c41d4cebca5 /test
parent5f745b8313acf893e1f782a8b69d4762e8b3fa69 (diff)
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')
-rw-r--r--test/ruby/test_object.rb8
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