From 7884a963f16952564efb130634f062d9b351fbc1 Mon Sep 17 00:00:00 2001 From: Ian Leitch Date: Wed, 28 Dec 2011 18:33:48 +0000 Subject: [PATCH] Use platform independent fixnum_max --- core/float/round_spec.rb | 2 +- core/integer/round_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/float/round_spec.rb b/core/float/round_spec.rb index 3043bf0235..2f7b79eeec 100644 --- a/core/float/round_spec.rb +++ b/core/float/round_spec.rb @@ -23,7 +23,7 @@ 123456.78.round(-2).should eql(123500) # rounded up -123456.78.round(-2).should eql(-123500) 12.345678.round(3.999).should == 12.346 - 0.8346268.round(-2.0**30).should eql(0) + 0.8346268.round(-fixnum_max).should eql(0) end it "raises a TypeError when its argument can not be converted to an Integer" do diff --git a/core/integer/round_spec.rb b/core/integer/round_spec.rb index d8b1f6e51b..a6aa37918e 100644 --- a/core/integer/round_spec.rb +++ b/core/integer/round_spec.rb @@ -32,7 +32,7 @@ ruby_bug "redmine #5271", "1.9.3" do it "returns 0 if passed a big negative value" do - 42.round(-2**30).should eql(0) + 42.round(-fixnum_max).should eql(0) end end