aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_time.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index 6177e198d9..db922e1177 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -71,4 +71,14 @@ class TestTime < Test::Unit::TestCase
assert_equal(Time.at(0x7fffffff), Time.at(-0x80000000) - (-0xffffffff))
end
end
+
+ def test_big_minus
+ begin
+ bigtime0 = Time.at(2**60)
+ bigtime1 = Time.at(2**60+1)
+ rescue RangeError
+ return
+ end
+ assert_equal(1.0, bigtime1 - bigtime0)
+ end
end