summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-16 22:18:12 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-16 22:18:12 +0000
commitc9165d06441fcb126d1d36a9b2fb123d404d2001 (patch)
treed5b96b635b9b3a7fe14f00a7660a7e1fd7146c7e /test
parente91e50d05eeb82ae6858b629f3e1d56a03503d79 (diff)
* marshal.c (r_object0): raise ArgumentError when linking to undefined
object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_marshal.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 3d7ce7d9e4..412039d106 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -725,4 +725,16 @@ class TestMarshal < Test::Unit::TestCase
opt = %w[--disable=gems]
assert_ruby_status(opt, "Marshal.load(#{crash.dump})")
end
+
+ def test_marshal_load_r_prepare_reference_crash
+ 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
+ RUBY
+ end
end