1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2020-12-27 17:35:32 +01:00
parent 267bed0cd9
commit 727c97da19
108 changed files with 1325 additions and 270 deletions

View file

@ -16,7 +16,7 @@ describe :object_id, shared: true do
o1.__send__(@method).should_not == o2.__send__(@method)
end
it "returns the same value for two Integers with the same value" do
it "returns the same value for two Fixnums with the same value" do
o1 = 1
o2 = 1
o1.send(@method).should == o2.send(@method)
@ -46,7 +46,7 @@ describe :object_id, shared: true do
o1.send(@method).should == o2.send(@method)
end
it "returns a different value for two Integer literals" do
it "returns a different value for two Bignum literals" do
o1 = 2e100.to_i
o2 = 2e100.to_i
o1.send(@method).should_not == o2.send(@method)
@ -64,14 +64,14 @@ describe :object_id, shared: true do
o1.send(@method).should_not == o2.send(@method)
end
it "returns a different value for two numbers near the 32 bit Integer limit" do
it "returns a different value for two numbers near the 32 bit Fixnum limit" do
o1 = -1
o2 = 2 ** 30 - 1
o1.send(@method).should_not == o2.send(@method)
end
it "returns a different value for two numbers near the 64 bit Integer limit" do
it "returns a different value for two numbers near the 64 bit Fixnum limit" do
o1 = -1
o2 = 2 ** 62 - 1