aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/integer
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-02-28 19:07:17 +0100
committerBenoit Daloze <eregontp@gmail.com>2020-02-28 19:07:17 +0100
commita0f5ff4c3cd05f8717be2bf1d79f0817f288d398 (patch)
tree441f409cf816cf8a61dacdbaf204ae9f5cbe2f18 /spec/ruby/core/integer
parent5d210501825e1682e68cbfc2be424fc339f382fa (diff)
downloadruby-a0f5ff4c3cd05f8717be2bf1d79f0817f288d398.tar.gz
Update to ruby/spec@41bf282
Diffstat (limited to 'spec/ruby/core/integer')
-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)