aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_rational.rb
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-03 01:26:41 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-03 01:26:41 +0000
commit89ae71d72157aa8800443741ff328199d7ba59e5 (patch)
treee6fe98c67139e01ca14d43237aa509fe7a7af6b9 /test/ruby/test_rational.rb
parent82cd48d7ee799ff1cd37c0ea0be2ab0d0aea9a2e (diff)
downloadruby-89ae71d72157aa8800443741ff328199d7ba59e5.tar.gz
* 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
Diffstat (limited to 'test/ruby/test_rational.rb')
-rw-r--r--test/ruby/test_rational.rb5
1 files changed, 5 insertions, 0 deletions
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