diff options
Diffstat (limited to 'test/ruby/test_complex.rb')
-rw-r--r-- | test/ruby/test_complex.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |