From d90af78f05df7cc1442aa205044d69baac6fc720 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 17 Mar 2016 01:23:03 +0000 Subject: 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 --- test/ruby/test_marshal.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test') 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 -- cgit v1.2.3