Permalink
Browse files

Fix the spec, which was broken by 6dc56da

Since 6dc56da introduced range check for the 7th argument of Time#new,
we need a value that falls in the permitted range that exhibits the
probelem raised by JRUBY-6592. 86399.9 turns out to be an easy and good
choice.

This spec still fails at commit da0f2eb but passes at commit d72c9f4.
  • Loading branch information...
1 parent 6dc56da commit c94eb81b36586b43d6a2f28f5117498b93ef4c48 @BanzaiMan BanzaiMan committed Mar 26, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 spec/regression/JRUBY-6952_time_plus_minus_rounding_errors_spec.rb
View
4 spec/regression/JRUBY-6952_time_plus_minus_rounding_errors_spec.rb
@@ -3,12 +3,12 @@
if RUBY_VERSION > '1.9'
describe 'Time#+' do
it 'does not introduce rounding errors' do
- time = Time.new(2012, 10, 17, 23, 59, 59, 999999.9)
+ time = Time.new(2012, 10, 17, 23, 59, 59, 86399.9)
time_p1 = time + 1
time_p1_m1 = time_p1 - 1
(time_p1.to_i - time.to_i).should == 1
time_p1_m1.to_i.should == time.to_i
end
end
-end
+end

0 comments on commit c94eb81

Please sign in to comment.