ruby-changes:12246
From: akr <ko1@a...>
Date: Thu, 2 Jul 2009 20:04:22 +0900 (JST)
Subject: [ruby-changes:12246] Ruby:r23935 (trunk): don't use a string for Time.at argument.
akr 2009-07-02 20:04:11 +0900 (Thu, 02 Jul 2009) New Revision: 23935 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23935 Log: don't use a string for Time.at argument. Modified files: trunk/test/ruby/test_time.rb Index: test/ruby/test_time.rb =================================================================== --- test/ruby/test_time.rb (revision 23934) +++ test/ruby/test_time.rb (revision 23935) @@ -109,21 +109,21 @@ end def test_at - assert_equal(100000, Time.at("0.1").usec) - assert_equal(10000, Time.at("0.01").usec) - assert_equal(1000, Time.at("0.001").usec) - assert_equal(100, Time.at("0.0001").usec) - assert_equal(10, Time.at("0.00001").usec) - assert_equal(1, Time.at("0.000001").usec) - assert_equal(100000000, Time.at("0.1").nsec) - assert_equal(10000000, Time.at("0.01").nsec) - assert_equal(1000000, Time.at("0.001").nsec) - assert_equal(100000, Time.at("0.0001").nsec) - assert_equal(10000, Time.at("0.00001").nsec) - assert_equal(1000, Time.at("0.000001").nsec) - assert_equal(100, Time.at("0.0000001").nsec) - assert_equal(10, Time.at("0.00000001").nsec) - assert_equal(1, Time.at("0.000000001").nsec) + assert_equal(100000, Time.at("0.1".to_r).usec) + assert_equal(10000, Time.at("0.01".to_r).usec) + assert_equal(1000, Time.at("0.001".to_r).usec) + assert_equal(100, Time.at("0.0001".to_r).usec) + assert_equal(10, Time.at("0.00001".to_r).usec) + assert_equal(1, Time.at("0.000001".to_r).usec) + assert_equal(100000000, Time.at("0.1".to_r).nsec) + assert_equal(10000000, Time.at("0.01".to_r).nsec) + assert_equal(1000000, Time.at("0.001".to_r).nsec) + assert_equal(100000, Time.at("0.0001".to_r).nsec) + assert_equal(10000, Time.at("0.00001".to_r).nsec) + assert_equal(1000, Time.at("0.000001".to_r).nsec) + assert_equal(100, Time.at("0.0000001".to_r).nsec) + assert_equal(10, Time.at("0.00000001".to_r).nsec) + assert_equal(1, Time.at("0.000000001".to_r).nsec) assert_equal(100000, Time.at(0.1).usec) assert_equal(10000, Time.at(0.01).usec) assert_equal(1000, Time.at(0.001).usec) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/