summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/date/test_date_marshal.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/date/test_date_marshal.rb b/test/date/test_date_marshal.rb
index c7ce737aac..fa8b2d91f8 100644
--- a/test/date/test_date_marshal.rb
+++ b/test/date/test_date_marshal.rb
@@ -39,6 +39,13 @@ class TestDateMarshal < Test::Unit::TestCase
assert(d.frozen?)
expected_error = defined?(FrozenError) ? FrozenError : RuntimeError
assert_raise(expected_error){d.marshal_load(a)}
+
+ d = Date.new + 1/2r + 2304/65437r/86400
+ m = Marshal.dump(d)
+ d2 = Marshal.load(m)
+ assert_equal(d, d2)
+ assert_equal(d.start, d2.start)
+ assert_instance_of(String, d2.to_s)
end
def test_memsize