From 62a3dbd539f1850288c3279457f9841427a6eed7 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 8 Oct 2018 08:54:35 +0000 Subject: Add test for marshal git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_time_tz.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb index fdea7a8e0f..daf75234df 100644 --- a/test/ruby/test_time_tz.rb +++ b/test/ruby/test_time_tz.rb @@ -542,4 +542,10 @@ class TestTimeTZ::WithTZ < Test::Unit::TestCase assert_equal([2018, 9, 1, 13, 6, 40, tz], [t.year, t.mon, t.mday, t.hour, t.min, t.sec, t.zone]) assert_equal(Time.utc(2018, 9, 1, 4, 6, 40), t) end + + def test_marshal + t = Time.new(2018, 9, 1, 12, 0, 0, tz) + t2 = Marshal.load(Marshal.dump(t)) + assert_equal(t, t2) + end end -- cgit v1.2.3