[前][次][番号順一覧][スレッド一覧]

ruby-changes:42064

From: nobu <ko1@a...>
Date: Thu, 17 Mar 2016 10:23:15 +0900 (JST)
Subject: [ruby-changes:42064] nobu:r54138 (trunk): test_marshal.rb: assert bad link

nobu	2016-03-17 10:23:03 +0900 (Thu, 17 Mar 2016)

  New Revision: 54138

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54138

  Log:
    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.

  Modified files:
    trunk/test/ruby/test_marshal.rb
Index: test/ruby/test_marshal.rb
===================================================================
--- test/ruby/test_marshal.rb	(revision 54137)
+++ test/ruby/test_marshal.rb	(revision 54138)
@@ -730,11 +730,10 @@ class TestMarshal < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_marshal.rb#L730
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]