summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_time.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index e6d5d31d80..39a8e297bb 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -540,4 +540,9 @@ class TestTime < Test::Unit::TestCase
assert_equal(-1, d1 <=> d2)
assert_equal(1, d2 <=> d1)
end
+
+ def test_to_r
+ assert_kind_of(Rational, Time.new(2000,1,1,0,0,Rational(4,3)).to_r)
+ assert_kind_of(Rational, Time.utc(1970).to_r)
+ end
end