diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-08 08:54:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-08 08:54:35 +0000 |
commit | 62a3dbd539f1850288c3279457f9841427a6eed7 (patch) | |
tree | 66516de9b42514a10ac54b854217f4968e5dcd23 /test | |
parent | 68ec41d7b94f426b9f2942456971bae21c6b5041 (diff) | |
download | ruby-62a3dbd539f1850288c3279457f9841427a6eed7.tar.gz |
Add test for marshal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_time_tz.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |