From 6897fddd656479cdd88d42aaea4ce65d369e2bc3 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 2 Jul 2009 11:04:11 +0000 Subject: [PATCH] don't use a string for Time.at argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_time.rb | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 8718dbc327..d7e736de3a 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -109,21 +109,21 @@ class TestTime < Test::Unit::TestCase 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)