diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-12-21 01:16:26 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-12-21 01:19:55 +0900 |
commit | 9c73c756244fa27ffa99d81dcc73a4ad14198002 (patch) | |
tree | 14b0ea9059b8c31e276531a1df712ead4e158cdb /spec/ruby/core/integer/shared | |
parent | fb8f011422c645ebe29e94c3fb2079af73d1d35f (diff) | |
download | ruby-9c73c756244fa27ffa99d81dcc73a4ad14198002.tar.gz |
Use Integer instead of Fixnum/Bignum
Diffstat (limited to 'spec/ruby/core/integer/shared')
-rw-r--r-- | spec/ruby/core/integer/shared/equal.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/integer/shared/next.rb | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/integer/shared/equal.rb b/spec/ruby/core/integer/shared/equal.rb index 4a5a236ffa..ecee17831c 100644 --- a/spec/ruby/core/integer/shared/equal.rb +++ b/spec/ruby/core/integer/shared/equal.rb @@ -4,7 +4,7 @@ describe :integer_equal, shared: true do 1.send(@method, 1).should == true 9.send(@method, 5).should == false - # Actually, these call Float#==, Bignum#== etc. + # Actually, these call Float#==, Integer#== etc. 9.send(@method, 9.0).should == true 9.send(@method, 9.01).should == false diff --git a/spec/ruby/core/integer/shared/next.rb b/spec/ruby/core/integer/shared/next.rb index 85b83d6965..fd983d53ec 100644 --- a/spec/ruby/core/integer/shared/next.rb +++ b/spec/ruby/core/integer/shared/next.rb @@ -1,25 +1,25 @@ describe :integer_next, shared: true do - it "returns the next larger positive Fixnum" do + it "returns the next larger positive Integer" do 2.send(@method).should == 3 end - it "returns the next larger negative Fixnum" do + it "returns the next larger negative Integer" do (-2).send(@method).should == -1 end - it "returns the next larger positive Bignum" do + it "returns the next larger positive Integer" do bignum_value.send(@method).should == bignum_value(1) end - it "returns the next larger negative Bignum" do + it "returns the next larger negative Integer" do (-bignum_value(1)).send(@method).should == -bignum_value end - it "overflows a Fixnum to a Bignum" do + it "overflows an Integer to an Integer" do fixnum_max.send(@method).should == fixnum_max + 1 end - it "underflows a Bignum to a Fixnum" do + it "underflows an Integer to an Integer" do (fixnum_min - 1).send(@method).should == fixnum_min end end |