ruby-changes:52749
From: nobu <ko1@a...>
Date: Mon, 8 Oct 2018 17:54:41 +0900 (JST)
Subject: [ruby-changes:52749] nobu:r64961 (trunk): Add test for marshal
nobu 2018-10-08 17:54:35 +0900 (Mon, 08 Oct 2018) New Revision: 64961 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64961 Log: Add test for marshal Modified files: trunk/test/ruby/test_time_tz.rb Index: test/ruby/test_time_tz.rb =================================================================== --- test/ruby/test_time_tz.rb (revision 64960) +++ test/ruby/test_time_tz.rb (revision 64961) @@ -542,4 +542,10 @@ class TestTimeTZ::WithTZ < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ruby/test_time_tz.rb#L542 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/