1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2016-03-17 01:23:03 +00:00
parent 82b8840320
commit d90af78f05

View file

@ -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