aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_time.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-22 12:08:02 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-22 12:08:02 +0000
commit1d674dc54730b7ffe900146139cbac13fe967f50 (patch)
treec2a65a8468fe4bb26c16f148ec405061a83aa65f /test/ruby/test_time.rb
parent0f02abb31bcb2da501845b945eea191a5bdadb4d (diff)
downloadruby-1d674dc54730b7ffe900146139cbac13fe967f50.tar.gz
* time.c (time_mload): add submicro into vtm.subsecx. [ruby-dev:40133]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26377 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 39a8e297bb..d5dd86765f 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -191,6 +191,13 @@ class TestTime < Test::Unit::TestCase
assert_marshal_roundtrip(Time.at(0, 0.120))
end
+ def test_marshal_nsec_191
+ # generated by ruby 1.9.1p376
+ m = "\x04\bIu:\tTime\r \x80\x11\x80@\xE2\x01\x00\x06:\rsubmicro\"\ax\x90"
+ t = Marshal.load(m)
+ assert_equal(Time.at(Rational(123456789, 1000000000)), t, "[ruby-dev:40133]")
+ end
+
def test_marshal_rational
assert_marshal_roundtrip(Time.at(0, Rational(1,3)))
assert_not_match(/Rational/, Marshal.dump(Time.at(0, Rational(1,3))))