aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-17 01:23:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-17 01:23:03 +0000
commitd90af78f05df7cc1442aa205044d69baac6fc720 (patch)
treed651ab6a52159c9c6a0910cf56bc7f28aea7ca3c
parent82b884032090aec113bb57dee40cec0f69441778 (diff)
downloadruby-d90af78f05df7cc1442aa205044d69baac6fc720.tar.gz
test_marshal.rb: assert bad link
* test/ruby/test_marshal.rb (test_marshal_load_r_prepare_reference_crash): assert an ArgumentError exception at a bad link. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_marshal.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 412039d106..e2e321bb41 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -730,11 +730,10 @@ class TestMarshal < Test::Unit::TestCase
crash = "\x04\bI/\x05\x00\x06:\x06E{\x06@\x05T"
opt = %w[--disable=gems]
- assert_ruby_status(opt, <<-RUBY)
-begin
- Marshal.load(#{crash.dump})
-rescue ArgumentError
-end
+ assert_separately(opt, <<-RUBY)
+ assert_raise_with_message(ArgumentError, /bad link/) do
+ Marshal.load(#{crash.dump})
+ end
RUBY
end
end