diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-05 09:36:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-05 09:36:16 +0000 |
commit | 5274f892015b2a41dc64c63a4ce1c843f4fb0a66 (patch) | |
tree | cc9c9cec201b0695bf0284cce027902448a11b4e /test/ruby/test_rational.rb | |
parent | 359d53787821dc287d0411565801d54791f0a9c6 (diff) | |
download | ruby-5274f892015b2a41dc64c63a4ce1c843f4fb0a66.tar.gz |
* 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
Diffstat (limited to 'test/ruby/test_rational.rb')
-rw-r--r-- | test/ruby/test_rational.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb index 02d8bd61ed..2f33ec2039 100644 --- a/test/ruby/test_rational.rb +++ b/test/ruby/test_rational.rb @@ -797,6 +797,11 @@ class Rational_Test < Test::Unit::TestCase assert_raise(ZeroDivisionError){ Marshal.load("\x04\bU:\rRational[\ai\x06i\x05") } + + bug3656 = '[ruby-core:31622]' + assert_raise(TypeError, bug3656) { + Rational(1,2).marshal_load(0) + } end def test_parse |