summaryrefslogtreecommitdiff
path: root/spec/ruby/core/integer/shared/equal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/integer/shared/equal.rb')
-rw-r--r--spec/ruby/core/integer/shared/equal.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/core/integer/shared/equal.rb b/spec/ruby/core/integer/shared/equal.rb
index ecee17831c..c621ba3f81 100644
--- a/spec/ruby/core/integer/shared/equal.rb
+++ b/spec/ruby/core/integer/shared/equal.rb
@@ -54,5 +54,10 @@ describe :integer_equal, shared: true do
@bignum.send(@method, obj).should == true
@bignum.send(@method, obj).should == false
end
+
+ it "does not lose precision when comparing with a Float" do
+ (bignum_value(1).send(@method, bignum_value.to_f)).should == false
+ (bignum_value.send(@method, bignum_value.to_f)).should == true
+ end
end
end