summaryrefslogtreecommitdiff
path: root/test/yaml
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-01 17:24:13 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-01 17:24:13 +0000
commitbd741ee16a414d15cc7be250c70f0cb01e742805 (patch)
tree2e236e405ecdb19d6f5ad2927ed141e5808d2601 /test/yaml
parent7ff702406a324ed12c69bc23a7cfaf066e401547 (diff)
(test_time_now_cycle): cut off under micro second.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/yaml')
-rw-r--r--test/yaml/test_yaml.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/test/yaml/test_yaml.rb b/test/yaml/test_yaml.rb
index 1aebfd30cc..74a2fa851e 100644
--- a/test/yaml/test_yaml.rb
+++ b/test/yaml/test_yaml.rb
@@ -34,14 +34,6 @@ class YAML_Unit_Tests < Test::Unit::TestCase
end
def assert_cycle( obj )
- if Time === obj
- x = YAML::load( obj.to_yaml )
- y = obj
- STDERR.puts [y.tv_sec, y.tv_usec, y.tv_nsec].inspect
- STDERR.puts [x.tv_sec, x.tv_usec, x.tv_nsec].inspect
- STDERR.puts [obj.<=>(x)]
- STDERR.puts [obj.eql?(x)].inspect
- end
assert_equal( obj, YAML::load( obj.to_yaml ) )
end
@@ -1198,6 +1190,7 @@ EOY
#
require 'yaml'
t = Time.now
+ t = Time.at(t.tv_sec, t.tv_usec)
5.times do
assert_cycle(t)
end