diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-17 01:23:03 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-17 01:23:03 +0000 |
commit | d90af78f05df7cc1442aa205044d69baac6fc720 (patch) | |
tree | d651ab6a52159c9c6a0910cf56bc7f28aea7ca3c /test/ruby | |
parent | 82b884032090aec113bb57dee40cec0f69441778 (diff) | |
download | ruby-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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_marshal.rb | 9 |
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 |