summaryrefslogtreecommitdiff
path: root/test/ruby/test_time.rb
diff options
context:
space:
mode:
authorayumin <ayumin@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-13 06:22:56 +0000
committerayumin <ayumin@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-13 06:22:56 +0000
commitabe4ff9225a17f0c53cbc8c7472841d7b088399b (patch)
tree5016eac33adfba0d02f51ad41fcb239818910e3a /test/ruby/test_time.rb
parentedfc3526a70e77f04ddc67f6c3dbe57c999c5d94 (diff)
merge revision(s) 33790:
* time.c (TIME_COPY_GMT): copy vtm.utc_offset and vtm.zone too. patch by Tomoyuki Chikanaga. [ruby-dev:44827] [Bug #5586] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_time.rb')
-rw-r--r--test/ruby/test_time.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index 0e61f32ab0..a1f060ec85 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -277,6 +277,13 @@ class TestTime < Test::Unit::TestCase
assert_equal(29700, t2.utc_offset, bug)
end
+ def test_marshal_to_s
+ t1 = Time.new(2011,11,8, 0,42,25, 9*3600)
+ t2 = Time.at(Marshal.load(Marshal.dump(t1)))
+ assert_equal("2011-11-08 00:42:25 +0900", t2.to_s,
+ "[ruby-dev:44827] [Bug #5586]")
+ end
+
# Sat Jan 01 00:00:00 UTC 2000
T2000 = Time.at(946684800).gmtime