diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-22 12:08:02 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-22 12:08:02 +0000 |
commit | 1d674dc54730b7ffe900146139cbac13fe967f50 (patch) | |
tree | c2a65a8468fe4bb26c16f148ec405061a83aa65f /test | |
parent | 0f02abb31bcb2da501845b945eea191a5bdadb4d (diff) | |
download | ruby-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')
-rw-r--r-- | test/ruby/test_time.rb | 7 |
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)))) |