From 5274f892015b2a41dc64c63a4ce1c843f4fb0a66 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 5 Aug 2010 09:36:16 +0000 Subject: * complex.c (nucomp_marshal_load): should check the argument. [ruby-core:31622] * rational.c (nurat_marshal_load): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rand.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby/test_rand.rb') diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb index 8ef360bd49..40b291f959 100644 --- a/test/ruby/test_rand.rb +++ b/test/ruby/test_rand.rb @@ -427,4 +427,11 @@ END assert_equal(x0, x2) end end + + def test_marshal + bug3656 = '[ruby-core:31622]' + assert_raise(TypeError, bug3656) { + Random.new.marshal_load(0) + } + end end -- cgit v1.2.3