From 89ae71d72157aa8800443741ff328199d7ba59e5 Mon Sep 17 00:00:00 2001 From: tadf Date: Sun, 3 Jun 2012 01:26:41 +0000 Subject: * complex.c (nucomp_marshal_load): [ruby-core:45394] * rational.c (nurat_marshal_load): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_complex.rb | 5 +++++ test/ruby/test_rational.rb | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'test') diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb index c6c6ef9882..aa6d6a77fe 100644 --- a/test/ruby/test_complex.rb +++ b/test/ruby/test_complex.rb @@ -661,6 +661,11 @@ class Complex_Test < Test::Unit::TestCase assert_raise(TypeError, bug3656) { Complex(1,2).marshal_load(0) } + + c = Complex(1,2) + c.freeze + assert(c.frozen?) + assert_raise(RuntimeError){c.marshal_load([2,3])} end def test_parse diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb index 70aab03c38..e1aafb5a0a 100644 --- a/test/ruby/test_rational.rb +++ b/test/ruby/test_rational.rb @@ -831,6 +831,11 @@ class Rational_Test < Test::Unit::TestCase assert_raise(TypeError, bug3656) { Rational(1,2).marshal_load(0) } + + c = Rational(1,2) + c.freeze + assert(c.frozen?) + assert_raise(RuntimeError){c.marshal_load([2,3])} end def test_parse -- cgit v1.2.3