aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/integer/lte_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/integer/lte_spec.rb')
-rw-r--r--spec/ruby/core/integer/lte_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/core/integer/lte_spec.rb b/spec/ruby/core/integer/lte_spec.rb
index 3d843a5dd9..40a89f094a 100644
--- a/spec/ruby/core/integer/lte_spec.rb
+++ b/spec/ruby/core/integer/lte_spec.rb
@@ -46,6 +46,11 @@ describe "Integer#<=" do
(@bignum <= (@bignum + 0.5)).should == false
end
+ it "returns true for bignums compare to a bigger float" do
+ (18446744073709551616 <= 1.8446744073709552e+19).should == true
+ (@bignum <= (@bignum + 9999.0)).should == true
+ end
+
it "raises an ArgumentError when given a non-Integer" do
-> { @bignum <= "4" }.should raise_error(ArgumentError)
-> { @bignum <= mock('str') }.should raise_error(ArgumentError)