[前][次][番号順一覧][スレッド一覧]

ruby-changes:2582

From: ko1@a...
Date: 2 Dec 2007 02:24:23 +0900
Subject: [ruby-changes:2582] akr - Ruby:r14073 (trunk): (test_time_now_cycle): cut off under micro second.

akr	2007-12-02 02:24:13 +0900 (Sun, 02 Dec 2007)

  New Revision: 14073

  Modified files:
    trunk/test/yaml/test_yaml.rb

  Log:
    (test_time_now_cycle): cut off under micro second.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/yaml/test_yaml.rb?r1=14073&r2=14072

Index: test/yaml/test_yaml.rb
===================================================================
--- test/yaml/test_yaml.rb	(revision 14072)
+++ test/yaml/test_yaml.rb	(revision 14073)
@@ -34,14 +34,6 @@
 	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 @@
         #
         require 'yaml'
         t = Time.now
+        t = Time.at(t.tv_sec, t.tv_usec)
         5.times do
             assert_cycle(t)
         end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]