diff options
Diffstat (limited to 'test/date/test_date_marshal.rb')
-rw-r--r-- | test/date/test_date_marshal.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/date/test_date_marshal.rb b/test/date/test_date_marshal.rb index 99a7239f95..24622bd4b9 100644 --- a/test/date/test_date_marshal.rb +++ b/test/date/test_date_marshal.rb @@ -30,13 +30,15 @@ class TestDateMarshal < Test::Unit::TestCase a = d.marshal_dump d.freeze assert(d.frozen?) - assert_raise(FrozenError){d.marshal_load(a)} + expected_error = defined?(FrozenError) ? FrozenError : RuntimeError + assert_raise(expected_error){d.marshal_load(a)} d = DateTime.now a = d.marshal_dump d.freeze assert(d.frozen?) - assert_raise(FrozenError){d.marshal_load(a)} + expected_error = defined?(FrozenError) ? FrozenError : RuntimeError + assert_raise(expected_error){d.marshal_load(a)} end end |