summaryrefslogtreecommitdiff
path: root/spec/ruby/core
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core')
-rw-r--r--spec/ruby/core/argf/shared/fileno.rb2
-rw-r--r--spec/ruby/core/array/bsearch_index_spec.rb2
-rw-r--r--spec/ruby/core/array/first_spec.rb2
-rw-r--r--spec/ruby/core/array/fixtures/classes.rb2
-rw-r--r--spec/ruby/core/array/hash_spec.rb2
-rw-r--r--spec/ruby/core/array/sample_spec.rb8
-rw-r--r--spec/ruby/core/array/shared/slice.rb4
-rw-r--r--spec/ruby/core/array/shared/union.rb2
-rw-r--r--spec/ruby/core/array/sort_spec.rb8
-rw-r--r--spec/ruby/core/basicobject/instance_eval_spec.rb8
-rw-r--r--spec/ruby/core/basicobject/instance_exec_spec.rb8
-rw-r--r--spec/ruby/core/builtin_constants/builtin_constants_spec.rb6
-rw-r--r--spec/ruby/core/class/initialize_spec.rb2
-rw-r--r--spec/ruby/core/class/superclass_spec.rb2
-rw-r--r--spec/ruby/core/complex/coerce_spec.rb2
-rw-r--r--spec/ruby/core/complex/equal_value_spec.rb2
-rw-r--r--spec/ruby/core/complex/exponent_spec.rb2
-rw-r--r--spec/ruby/core/complex/shared/divide.rb4
-rw-r--r--spec/ruby/core/complex/to_f_spec.rb2
-rw-r--r--spec/ruby/core/complex/to_i_spec.rb2
-rw-r--r--spec/ruby/core/complex/to_r_spec.rb2
-rw-r--r--spec/ruby/core/dir/fileno_spec.rb2
-rw-r--r--spec/ruby/core/encoding/converter/constants_spec.rb52
-rw-r--r--spec/ruby/core/encoding/converter/new_spec.rb4
-rw-r--r--spec/ruby/core/enumerable/first_spec.rb2
-rw-r--r--spec/ruby/core/enumerable/fixtures/classes.rb2
-rw-r--r--spec/ruby/core/enumerable/sort_spec.rb2
-rw-r--r--spec/ruby/core/enumerator/initialize_spec.rb2
-rw-r--r--spec/ruby/core/enumerator/lazy/initialize_spec.rb2
-rw-r--r--spec/ruby/core/exception/system_call_error_spec.rb2
-rw-r--r--spec/ruby/core/file/size_spec.rb4
-rw-r--r--spec/ruby/core/file/umask_spec.rb4
-rw-r--r--spec/ruby/core/float/comparison_spec.rb2
-rw-r--r--spec/ruby/core/float/shared/quo.rb4
-rw-r--r--spec/ruby/core/hash/shared/store.rb2
-rw-r--r--spec/ruby/core/integer/coerce_spec.rb20
-rw-r--r--spec/ruby/core/integer/comparison_spec.rb8
-rw-r--r--spec/ruby/core/integer/constants_spec.rb32
-rw-r--r--spec/ruby/core/integer/denominator_spec.rb2
-rw-r--r--spec/ruby/core/integer/div_spec.rb2
-rw-r--r--spec/ruby/core/integer/downto_spec.rb2
-rw-r--r--spec/ruby/core/integer/element_reference_spec.rb4
-rw-r--r--spec/ruby/core/integer/even_spec.rb4
-rw-r--r--spec/ruby/core/integer/gcd_spec.rb8
-rw-r--r--spec/ruby/core/integer/gcdlcm_spec.rb8
-rw-r--r--spec/ruby/core/integer/lcm_spec.rb8
-rw-r--r--spec/ruby/core/integer/left_shift_spec.rb20
-rw-r--r--spec/ruby/core/integer/right_shift_spec.rb18
-rw-r--r--spec/ruby/core/integer/shared/equal.rb2
-rw-r--r--spec/ruby/core/integer/shared/next.rb12
-rw-r--r--spec/ruby/core/integer/to_r_spec.rb4
-rw-r--r--spec/ruby/core/integer/uminus_spec.rb2
-rw-r--r--spec/ruby/core/integer/upto_spec.rb2
-rw-r--r--spec/ruby/core/io/initialize_spec.rb2
-rw-r--r--spec/ruby/core/io/shared/new.rb4
-rw-r--r--spec/ruby/core/io/shared/pos.rb2
-rw-r--r--spec/ruby/core/io/shared/readlines.rb12
-rw-r--r--spec/ruby/core/io/sysopen_spec.rb4
-rw-r--r--spec/ruby/core/io/ungetbyte_spec.rb4
-rw-r--r--spec/ruby/core/kernel/Float_spec.rb4
-rw-r--r--spec/ruby/core/kernel/Integer_spec.rb14
-rw-r--r--spec/ruby/core/kernel/class_spec.rb2
-rw-r--r--spec/ruby/core/kernel/instance_variable_get_spec.rb2
-rw-r--r--spec/ruby/core/kernel/instance_variable_set_spec.rb2
-rw-r--r--spec/ruby/core/kernel/shared/require.rb2
-rw-r--r--spec/ruby/core/kernel/singleton_class_spec.rb2
-rw-r--r--spec/ruby/core/kernel/sleep_spec.rb2
-rw-r--r--spec/ruby/core/kernel/srand_spec.rb2
-rw-r--r--spec/ruby/core/kernel/taint_spec.rb2
-rw-r--r--spec/ruby/core/marshal/dump_spec.rb14
-rw-r--r--spec/ruby/core/marshal/fixtures/marshal_data.rb60
-rw-r--r--spec/ruby/core/marshal/shared/load.rb16
-rw-r--r--spec/ruby/core/method/source_location_spec.rb4
-rw-r--r--spec/ruby/core/module/attr_accessor_spec.rb10
-rw-r--r--spec/ruby/core/module/constants_spec.rb4
-rw-r--r--spec/ruby/core/module/private_method_defined_spec.rb2
-rw-r--r--spec/ruby/core/module/protected_method_defined_spec.rb2
-rw-r--r--spec/ruby/core/module/public_method_defined_spec.rb2
-rw-r--r--spec/ruby/core/nil/to_i_spec.rb2
-rw-r--r--spec/ruby/core/numeric/denominator_spec.rb2
-rw-r--r--spec/ruby/core/numeric/quo_spec.rb2
-rw-r--r--spec/ruby/core/numeric/real_spec.rb2
-rw-r--r--spec/ruby/core/numeric/shared/imag.rb2
-rw-r--r--spec/ruby/core/numeric/shared/rect.rb2
-rw-r--r--spec/ruby/core/numeric/shared/step.rb16
-rw-r--r--spec/ruby/core/objectspace/_id2ref_spec.rb2
-rw-r--r--spec/ruby/core/proc/hash_spec.rb2
-rw-r--r--spec/ruby/core/proc/source_location_spec.rb10
-rw-r--r--spec/ruby/core/process/euid_spec.rb2
-rw-r--r--spec/ruby/core/process/getpriority_spec.rb8
-rw-r--r--spec/ruby/core/process/kill_spec.rb2
-rw-r--r--spec/ruby/core/process/maxgroups_spec.rb2
-rw-r--r--spec/ruby/core/process/pid_spec.rb2
-rw-r--r--spec/ruby/core/process/spawn_spec.rb8
-rw-r--r--spec/ruby/core/random/new_seed_spec.rb4
-rw-r--r--spec/ruby/core/random/new_spec.rb2
-rw-r--r--spec/ruby/core/random/rand_spec.rb20
-rw-r--r--spec/ruby/core/range/hash_spec.rb10
-rw-r--r--spec/ruby/core/regexp/last_match_spec.rb2
-rw-r--r--spec/ruby/core/regexp/new_spec.rb2
-rw-r--r--spec/ruby/core/regexp/options_spec.rb6
-rw-r--r--spec/ruby/core/regexp/shared/new.rb6
-rw-r--r--spec/ruby/core/string/bytes_spec.rb6
-rw-r--r--spec/ruby/core/string/element_set_spec.rb10
-rw-r--r--spec/ruby/core/string/index_spec.rb2
-rw-r--r--spec/ruby/core/string/ord_spec.rb4
-rw-r--r--spec/ruby/core/string/rindex_spec.rb2
-rw-r--r--spec/ruby/core/string/shared/codepoints.rb4
-rw-r--r--spec/ruby/core/string/to_i_spec.rb18
-rw-r--r--spec/ruby/core/struct/hash_spec.rb4
-rw-r--r--spec/ruby/core/symbol/casecmp_spec.rb2
-rw-r--r--spec/ruby/core/symbol/comparison_spec.rb2
-rw-r--r--spec/ruby/core/time/hash_spec.rb4
-rw-r--r--spec/ruby/core/time/subsec_spec.rb2
-rw-r--r--spec/ruby/core/unboundmethod/source_location_spec.rb4
115 files changed, 339 insertions, 337 deletions
diff --git a/spec/ruby/core/argf/shared/fileno.rb b/spec/ruby/core/argf/shared/fileno.rb
index 5d674048e2..4350d43747 100644
--- a/spec/ruby/core/argf/shared/fileno.rb
+++ b/spec/ruby/core/argf/shared/fileno.rb
@@ -11,7 +11,7 @@ describe :argf_fileno, shared: true do
# returns first current file even when not yet open
result << @argf.send(@method) while @argf.gets
# returns last current file even when closed
- result.map { |d| d.class }.should == [Fixnum, Fixnum, Fixnum, Fixnum]
+ result.map { |d| d.class }.should == [Integer, Integer, Integer, Integer]
end
end
diff --git a/spec/ruby/core/array/bsearch_index_spec.rb b/spec/ruby/core/array/bsearch_index_spec.rb
index aafded178d..df2c7c098e 100644
--- a/spec/ruby/core/array/bsearch_index_spec.rb
+++ b/spec/ruby/core/array/bsearch_index_spec.rb
@@ -77,7 +77,7 @@ describe "Array#bsearch_index" do
@array.bsearch_index { |x| (-1) * (2**100) }.should be_nil
end
- it "handles values from Bignum#coerce" do
+ it "handles values from Integer#coerce" do
[1, 2].should include(@array.bsearch_index { |x| (2**100).coerce((1 - x / 4) * (2**100)).first })
end
end
diff --git a/spec/ruby/core/array/first_spec.rb b/spec/ruby/core/array/first_spec.rb
index 66eeba6565..463da829a2 100644
--- a/spec/ruby/core/array/first_spec.rb
+++ b/spec/ruby/core/array/first_spec.rb
@@ -33,7 +33,7 @@ describe "Array#first" do
-> { [1, 2].first(-1) }.should raise_error(ArgumentError)
end
- it "raises a RangeError when count is a Bignum" do
+ it "raises a RangeError when count is an Integer" do
-> { [].first(bignum_value) }.should raise_error(RangeError)
end
diff --git a/spec/ruby/core/array/fixtures/classes.rb b/spec/ruby/core/array/fixtures/classes.rb
index 2791a2eb5d..affb3b49e6 100644
--- a/spec/ruby/core/array/fixtures/classes.rb
+++ b/spec/ruby/core/array/fixtures/classes.rb
@@ -126,7 +126,7 @@ module ArraySpecs
attr_accessor :order
end
- class ComparableWithFixnum
+ class ComparableWithInteger
include Comparable
def initialize(num)
@num = num
diff --git a/spec/ruby/core/array/hash_spec.rb b/spec/ruby/core/array/hash_spec.rb
index 8392253ae4..f3bcc83fce 100644
--- a/spec/ruby/core/array/hash_spec.rb
+++ b/spec/ruby/core/array/hash_spec.rb
@@ -7,7 +7,7 @@ describe "Array#hash" do
[[], [1, 2, 3]].each do |ary|
ary.hash.should == ary.dup.hash
- ary.hash.should be_an_instance_of(Fixnum)
+ ary.hash.should be_an_instance_of(Integer)
end
end
diff --git a/spec/ruby/core/array/sample_spec.rb b/spec/ruby/core/array/sample_spec.rb
index 73b6bdf480..565d7ff7f9 100644
--- a/spec/ruby/core/array/sample_spec.rb
+++ b/spec/ruby/core/array/sample_spec.rb
@@ -69,7 +69,7 @@ describe "Array#sample" do
obj = mock("array_sample_random")
obj.should_receive(:rand).and_return(0.5)
- [1, 2].sample(random: obj).should be_an_instance_of(Fixnum)
+ [1, 2].sample(random: obj).should be_an_instance_of(Integer)
end
it "raises a NoMethodError if an object passed for the RNG does not define #rand" do
@@ -78,8 +78,8 @@ describe "Array#sample" do
-> { [1, 2].sample(random: obj) }.should raise_error(NoMethodError)
end
- describe "when the object returned by #rand is a Fixnum" do
- it "uses the fixnum as index" do
+ describe "when the object returned by #rand is an Integer" do
+ it "uses the integer as index" do
random = mock("array_sample_random_ret")
random.should_receive(:rand).and_return(0)
@@ -107,7 +107,7 @@ describe "Array#sample" do
end
end
- describe "when the object returned by #rand is not a Fixnum but responds to #to_int" do
+ describe "when the object returned by #rand is not an Integer but responds to #to_int" do
it "calls #to_int on the Object" do
value = mock("array_sample_random_value")
value.should_receive(:to_int).and_return(1)
diff --git a/spec/ruby/core/array/shared/slice.rb b/spec/ruby/core/array/shared/slice.rb
index 845be768c6..820047cdb2 100644
--- a/spec/ruby/core/array/shared/slice.rb
+++ b/spec/ruby/core/array/shared/slice.rb
@@ -486,7 +486,7 @@ describe :array_slice, shared: true do
end
end
- it "raises a RangeError when the start index is out of range of Fixnum" do
+ it "raises a RangeError when the start index is out of range of Integer" do
array = [1, 2, 3, 4, 5, 6]
obj = mock('large value')
obj.should_receive(:to_int).and_return(bignum_value)
@@ -502,7 +502,7 @@ describe :array_slice, shared: true do
array.send(@method, max_long.to_f.prev_float).should == nil
end
- it "raises a RangeError when the length is out of range of Fixnum" do
+ it "raises a RangeError when the length is out of range of Integer" do
array = [1, 2, 3, 4, 5, 6]
obj = mock('large value')
obj.should_receive(:to_int).and_return(bignum_value)
diff --git a/spec/ruby/core/array/shared/union.rb b/spec/ruby/core/array/shared/union.rb
index 12a98cc9fe..0b60df9ca4 100644
--- a/spec/ruby/core/array/shared/union.rb
+++ b/spec/ruby/core/array/shared/union.rb
@@ -31,7 +31,7 @@ describe :array_binary_union, shared: true do
[0].send(@method, obj).should == ([0] | [1, 2, 3])
end
- # MRI follows hashing semantics here, so doesn't actually call eql?/hash for Fixnum/Symbol
+ # MRI follows hashing semantics here, so doesn't actually call eql?/hash for Integer/Symbol
it "acts as if using an intermediate hash to collect values" do
not_supported_on :opal do
[5.0, 4.0].send(@method, [5, 4]).should == [5.0, 4.0, 5, 4]
diff --git a/spec/ruby/core/array/sort_spec.rb b/spec/ruby/core/array/sort_spec.rb
index 0c5ecdcbbf..e20b650516 100644
--- a/spec/ruby/core/array/sort_spec.rb
+++ b/spec/ruby/core/array/sort_spec.rb
@@ -111,10 +111,10 @@ describe "Array#sort" do
[1, 2, 3].sort{ break :a }.should == :a
end
- it "uses the sign of Bignum block results as the sort result" do
+ it "uses the sign of Integer block results as the sort result" do
a = [1, 2, 5, 10, 7, -4, 12]
begin
- class Bignum;
+ class Integer
alias old_spaceship <=>
def <=>(other)
raise
@@ -122,7 +122,7 @@ describe "Array#sort" do
end
a.sort {|n, m| (n - m) * (2 ** 200)}.should == [-4, 1, 2, 5, 7, 10, 12]
ensure
- class Bignum
+ class Integer
alias <=> old_spaceship
end
end
@@ -132,7 +132,7 @@ describe "Array#sort" do
a = [1, 2, 5, 10, 7, -4, 12]
a.sort { |n, m| n - m }.should == [-4, 1, 2, 5, 7, 10, 12]
a.sort { |n, m|
- ArraySpecs::ComparableWithFixnum.new(n-m)
+ ArraySpecs::ComparableWithInteger.new(n-m)
}.should == [-4, 1, 2, 5, 7, 10, 12]
-> {
a.sort { |n, m| (n - m).to_s }
diff --git a/spec/ruby/core/basicobject/instance_eval_spec.rb b/spec/ruby/core/basicobject/instance_eval_spec.rb
index d3dd05b745..b6a146095d 100644
--- a/spec/ruby/core/basicobject/instance_eval_spec.rb
+++ b/spec/ruby/core/basicobject/instance_eval_spec.rb
@@ -131,14 +131,14 @@ describe "BasicObject#instance_eval" do
end
quarantine! do # Not clean, leaves cvars lying around to break other specs
- it "scopes class var accesses in the caller when called on a Fixnum" do
- # Fixnum can take instance vars
- Fixnum.class_eval "@@__tmp_instance_eval_spec = 1"
+ it "scopes class var accesses in the caller when called on an Integer" do
+ # Integer can take instance vars
+ Integer.class_eval "@@__tmp_instance_eval_spec = 1"
(defined? @@__tmp_instance_eval_spec).should be_nil
@@__tmp_instance_eval_spec = 2
1.instance_eval { @@__tmp_instance_eval_spec }.should == 2
- Fixnum.__send__(:remove_class_variable, :@@__tmp_instance_eval_spec)
+ Integer.__send__(:remove_class_variable, :@@__tmp_instance_eval_spec)
end
end
diff --git a/spec/ruby/core/basicobject/instance_exec_spec.rb b/spec/ruby/core/basicobject/instance_exec_spec.rb
index e25482d58a..289fdd889b 100644
--- a/spec/ruby/core/basicobject/instance_exec_spec.rb
+++ b/spec/ruby/core/basicobject/instance_exec_spec.rb
@@ -85,14 +85,14 @@ describe "BasicObject#instance_exec" do
end
quarantine! do # Not clean, leaves cvars lying around to break other specs
- it "scopes class var accesses in the caller when called on a Fixnum" do
- # Fixnum can take instance vars
- Fixnum.class_eval "@@__tmp_instance_exec_spec = 1"
+ it "scopes class var accesses in the caller when called on an Integer" do
+ # Integer can take instance vars
+ Integer.class_eval "@@__tmp_instance_exec_spec = 1"
(defined? @@__tmp_instance_exec_spec).should == nil
@@__tmp_instance_exec_spec = 2
1.instance_exec { @@__tmp_instance_exec_spec }.should == 2
- Fixnum.__send__(:remove_class_variable, :@@__tmp_instance_exec_spec)
+ Integer.__send__(:remove_class_variable, :@@__tmp_instance_exec_spec)
end
end
diff --git a/spec/ruby/core/builtin_constants/builtin_constants_spec.rb b/spec/ruby/core/builtin_constants/builtin_constants_spec.rb
index 21102bee9f..7c87a970d7 100644
--- a/spec/ruby/core/builtin_constants/builtin_constants_spec.rb
+++ b/spec/ruby/core/builtin_constants/builtin_constants_spec.rb
@@ -7,8 +7,8 @@ describe "RUBY_VERSION" do
end
describe "RUBY_PATCHLEVEL" do
- it "is a Fixnum" do
- RUBY_PATCHLEVEL.should be_kind_of(Fixnum)
+ it "is an Integer" do
+ RUBY_PATCHLEVEL.should be_kind_of(Integer)
end
end
@@ -51,7 +51,7 @@ end
describe "RUBY_REVISION" do
ruby_version_is ""..."2.7" do
it "is an Integer" do
- RUBY_REVISION.should be_kind_of(Fixnum)
+ RUBY_REVISION.should be_kind_of(Integer)
end
end
diff --git a/spec/ruby/core/class/initialize_spec.rb b/spec/ruby/core/class/initialize_spec.rb
index 9678d7b373..6348758485 100644
--- a/spec/ruby/core/class/initialize_spec.rb
+++ b/spec/ruby/core/class/initialize_spec.rb
@@ -7,7 +7,7 @@ describe "Class#initialize" do
it "raises a TypeError when called on already initialized classes" do
->{
- Fixnum.send :initialize
+ Integer.send :initialize
}.should raise_error(TypeError)
->{
diff --git a/spec/ruby/core/class/superclass_spec.rb b/spec/ruby/core/class/superclass_spec.rb
index deb5a45336..00579238a6 100644
--- a/spec/ruby/core/class/superclass_spec.rb
+++ b/spec/ruby/core/class/superclass_spec.rb
@@ -8,7 +8,7 @@ describe "Class#superclass" do
Class.superclass.should == Module
Class.new.superclass.should == Object
Class.new(String).superclass.should == String
- Class.new(Fixnum).superclass.should == Fixnum
+ Class.new(Integer).superclass.should == Integer
end
# redmine:567
diff --git a/spec/ruby/core/complex/coerce_spec.rb b/spec/ruby/core/complex/coerce_spec.rb
index a30a6c1d5f..9023234e73 100644
--- a/spec/ruby/core/complex/coerce_spec.rb
+++ b/spec/ruby/core/complex/coerce_spec.rb
@@ -19,7 +19,7 @@ describe "Complex#coerce" do
result.last.should be_kind_of(Complex)
end
- it "returns an array containing other and self as Complex when other is a Bignum" do
+ it "returns an array containing other and self as Complex when other is an Integer" do
result = @one.coerce(4294967296)
result.should == [4294967296, 1]
result.first.should be_kind_of(Complex)
diff --git a/spec/ruby/core/complex/equal_value_spec.rb b/spec/ruby/core/complex/equal_value_spec.rb
index b1e4f9cfcd..ad7236b1bd 100644
--- a/spec/ruby/core/complex/equal_value_spec.rb
+++ b/spec/ruby/core/complex/equal_value_spec.rb
@@ -53,7 +53,7 @@ describe "Complex#==" do
end
describe "with Object" do
- # Fixnum#==, Float#== and Bignum#== only return booleans - Bug?
+ # Integer#== and Float#== only return booleans - Bug?
it "calls other#== with self" do
value = Complex(3, 0)
diff --git a/spec/ruby/core/complex/exponent_spec.rb b/spec/ruby/core/complex/exponent_spec.rb
index bf07c90038..86f827aece 100644
--- a/spec/ruby/core/complex/exponent_spec.rb
+++ b/spec/ruby/core/complex/exponent_spec.rb
@@ -1,7 +1,7 @@
require_relative '../../spec_helper'
describe "Complex#**" do
- describe "with Fixnum 0" do
+ describe "with Integer 0" do
it "returns Complex(1)" do
(Complex(3, 4) ** 0).should eql(Complex(1))
end
diff --git a/spec/ruby/core/complex/shared/divide.rb b/spec/ruby/core/complex/shared/divide.rb
index a60802c74c..dc1b870cff 100644
--- a/spec/ruby/core/complex/shared/divide.rb
+++ b/spec/ruby/core/complex/shared/divide.rb
@@ -12,7 +12,7 @@ describe :complex_divide, shared: true do
end
end
- describe "with Fixnum" do
+ describe "with Integer" do
it "divides both parts of the Complex number" do
Complex(20, 40).send(@method, 2).should == Complex(10, 20)
Complex(30, 30).send(@method, 10).should == Complex(3, 3)
@@ -27,7 +27,7 @@ describe :complex_divide, shared: true do
end
end
- describe "with Bignum" do
+ describe "with Integer" do
it "divides both parts of the Complex number" do
Complex(20, 40).send(@method, 2).should == Complex(10, 20)
Complex(15, 16).send(@method, 2.0).should be_close(Complex(7.5, 8), TOLERANCE)
diff --git a/spec/ruby/core/complex/to_f_spec.rb b/spec/ruby/core/complex/to_f_spec.rb
index 78e6526491..b53471c1fc 100644
--- a/spec/ruby/core/complex/to_f_spec.rb
+++ b/spec/ruby/core/complex/to_f_spec.rb
@@ -1,7 +1,7 @@
require_relative '../../spec_helper'
describe "Complex#to_f" do
- describe "when the imaginary part is Fixnum 0" do
+ describe "when the imaginary part is Integer 0" do
it "returns the result of sending #to_f to the real part" do
real = mock_numeric('real')
real.should_receive(:to_f).and_return(:f)
diff --git a/spec/ruby/core/complex/to_i_spec.rb b/spec/ruby/core/complex/to_i_spec.rb
index 23134705ba..1e78f5ec0e 100644
--- a/spec/ruby/core/complex/to_i_spec.rb
+++ b/spec/ruby/core/complex/to_i_spec.rb
@@ -1,7 +1,7 @@
require_relative '../../spec_helper'
describe "Complex#to_i" do
- describe "when the imaginary part is Fixnum 0" do
+ describe "when the imaginary part is Integer 0" do
it "returns the result of sending #to_i to the real part" do
real = mock_numeric('real')
real.should_receive(:to_i).and_return(:i)
diff --git a/spec/ruby/core/complex/to_r_spec.rb b/spec/ruby/core/complex/to_r_spec.rb
index 76a69a0b93..4559921492 100644
--- a/spec/ruby/core/complex/to_r_spec.rb
+++ b/spec/ruby/core/complex/to_r_spec.rb
@@ -1,7 +1,7 @@
require_relative '../../spec_helper'
describe "Complex#to_r" do
- describe "when the imaginary part is Fixnum 0" do
+ describe "when the imaginary part is Integer 0" do
it "returns the result of sending #to_r to the real part" do
real = mock_numeric('real')
real.should_receive(:to_r).and_return(:r)
diff --git a/spec/ruby/core/dir/fileno_spec.rb b/spec/ruby/core/dir/fileno_spec.rb
index 504e36d44b..bb84ef5378 100644
--- a/spec/ruby/core/dir/fileno_spec.rb
+++ b/spec/ruby/core/dir/fileno_spec.rb
@@ -27,7 +27,7 @@ describe "Dir#fileno" do
if has_dir_fileno
it "returns the file descriptor of the dir" do
- @dir.fileno.should be_kind_of(Fixnum)
+ @dir.fileno.should be_kind_of(Integer)
end
else
it "raises an error when not implemented on the platform" do
diff --git a/spec/ruby/core/encoding/converter/constants_spec.rb b/spec/ruby/core/encoding/converter/constants_spec.rb
index 57b6a4d4e7..7d29bdb278 100644
--- a/spec/ruby/core/encoding/converter/constants_spec.rb
+++ b/spec/ruby/core/encoding/converter/constants_spec.rb
@@ -5,8 +5,8 @@ describe "Encoding::Converter::INVALID_MASK" do
Encoding::Converter.should have_constant(:INVALID_MASK)
end
- it "has a Fixnum value" do
- Encoding::Converter::INVALID_MASK.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::INVALID_MASK.should be_an_instance_of(Integer)
end
end
@@ -15,8 +15,8 @@ describe "Encoding::Converter::INVALID_REPLACE" do
Encoding::Converter.should have_constant(:INVALID_REPLACE)
end
- it "has a Fixnum value" do
- Encoding::Converter::INVALID_REPLACE.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::INVALID_REPLACE.should be_an_instance_of(Integer)
end
end
@@ -25,8 +25,8 @@ describe "Encoding::Converter::UNDEF_MASK" do
Encoding::Converter.should have_constant(:UNDEF_MASK)
end
- it "has a Fixnum value" do
- Encoding::Converter::UNDEF_MASK.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::UNDEF_MASK.should be_an_instance_of(Integer)
end
end
@@ -35,8 +35,8 @@ describe "Encoding::Converter::UNDEF_REPLACE" do
Encoding::Converter.should have_constant(:UNDEF_REPLACE)
end
- it "has a Fixnum value" do
- Encoding::Converter::UNDEF_REPLACE.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::UNDEF_REPLACE.should be_an_instance_of(Integer)
end
end
@@ -45,8 +45,8 @@ describe "Encoding::Converter::UNDEF_HEX_CHARREF" do
Encoding::Converter.should have_constant(:UNDEF_HEX_CHARREF)
end
- it "has a Fixnum value" do
- Encoding::Converter::UNDEF_HEX_CHARREF.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::UNDEF_HEX_CHARREF.should be_an_instance_of(Integer)
end
end
@@ -55,8 +55,8 @@ describe "Encoding::Converter::PARTIAL_INPUT" do
Encoding::Converter.should have_constant(:PARTIAL_INPUT)
end
- it "has a Fixnum value" do
- Encoding::Converter::PARTIAL_INPUT.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::PARTIAL_INPUT.should be_an_instance_of(Integer)
end
end
@@ -65,8 +65,8 @@ describe "Encoding::Converter::AFTER_OUTPUT" do
Encoding::Converter.should have_constant(:AFTER_OUTPUT)
end
- it "has a Fixnum value" do
- Encoding::Converter::AFTER_OUTPUT.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::AFTER_OUTPUT.should be_an_instance_of(Integer)
end
end
@@ -75,8 +75,8 @@ describe "Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR" do
Encoding::Converter.should have_constant(:UNIVERSAL_NEWLINE_DECORATOR)
end
- it "has a Fixnum value" do
- Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR.should be_an_instance_of(Integer)
end
end
@@ -85,8 +85,8 @@ describe "Encoding::Converter::CRLF_NEWLINE_DECORATOR" do
Encoding::Converter.should have_constant(:CRLF_NEWLINE_DECORATOR)
end
- it "has a Fixnum value" do
- Encoding::Converter::CRLF_NEWLINE_DECORATOR.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::CRLF_NEWLINE_DECORATOR.should be_an_instance_of(Integer)
end
end
@@ -95,8 +95,8 @@ describe "Encoding::Converter::CR_NEWLINE_DECORATOR" do
Encoding::Converter.should have_constant(:CR_NEWLINE_DECORATOR)
end
- it "has a Fixnum value" do
- Encoding::Converter::CR_NEWLINE_DECORATOR.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::CR_NEWLINE_DECORATOR.should be_an_instance_of(Integer)
end
end
@@ -105,8 +105,8 @@ describe "Encoding::Converter::XML_TEXT_DECORATOR" do
Encoding::Converter.should have_constant(:XML_TEXT_DECORATOR)
end
- it "has a Fixnum value" do
- Encoding::Converter::XML_TEXT_DECORATOR.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::XML_TEXT_DECORATOR.should be_an_instance_of(Integer)
end
end
@@ -115,8 +115,8 @@ describe "Encoding::Converter::XML_ATTR_CONTENT_DECORATOR" do
Encoding::Converter.should have_constant(:XML_ATTR_CONTENT_DECORATOR)
end
- it "has a Fixnum value" do
- Encoding::Converter::XML_ATTR_CONTENT_DECORATOR.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::XML_ATTR_CONTENT_DECORATOR.should be_an_instance_of(Integer)
end
end
@@ -125,7 +125,7 @@ describe "Encoding::Converter::XML_ATTR_QUOTE_DECORATOR" do
Encoding::Converter.should have_constant(:XML_ATTR_QUOTE_DECORATOR)
end
- it "has a Fixnum value" do
- Encoding::Converter::XML_ATTR_QUOTE_DECORATOR.should be_an_instance_of(Fixnum)
+ it "has an Integer value" do
+ Encoding::Converter::XML_ATTR_QUOTE_DECORATOR.should be_an_instance_of(Integer)
end
end
diff --git a/spec/ruby/core/encoding/converter/new_spec.rb b/spec/ruby/core/encoding/converter/new_spec.rb
index 9fc97263fe..1f7affc72b 100644
--- a/spec/ruby/core/encoding/converter/new_spec.rb
+++ b/spec/ruby/core/encoding/converter/new_spec.rb
@@ -47,7 +47,7 @@ describe "Encoding::Converter.new" do
conv.replacement.should == "fubar"
end
- it "calls #to_hash to convert the options argument to a Hash if not a Fixnum" do
+ it "calls #to_hash to convert the options argument to a Hash if not an Integer" do
opts = mock("encoding converter options")
opts.should_receive(:to_hash).and_return({ replace: "fubar" })
conv = Encoding::Converter.new("us-ascii", "utf-8", **opts)
@@ -82,7 +82,7 @@ describe "Encoding::Converter.new" do
end.should raise_error(TypeError)
end
- it "raises a TypeError if passed a Fixnum for the replacement object" do
+ it "raises a TypeError if passed an Integer for the replacement object" do
-> do
Encoding::Converter.new("us-ascii", "utf-8", replace: 1)
end.should raise_error(TypeError)
diff --git a/spec/ruby/core/enumerable/first_spec.rb b/spec/ruby/core/enumerable/first_spec.rb
index ed1ba599b4..1398807fa7 100644
--- a/spec/ruby/core/enumerable/first_spec.rb
+++ b/spec/ruby/core/enumerable/first_spec.rb
@@ -17,7 +17,7 @@ describe "Enumerable#first" do
EnumerableSpecs::YieldsMixed2.new.to_enum.first.should == nil
end
- it "raises a RangeError when passed a Bignum" do
+ it "raises a RangeError when passed an Integer" do
enum = EnumerableSpecs::Empty.new
-> { enum.first(bignum_value) }.should raise_error(RangeError)
end
diff --git a/spec/ruby/core/enumerable/fixtures/classes.rb b/spec/ruby/core/enumerable/fixtures/classes.rb
index 5051196742..fb4951c6e6 100644
--- a/spec/ruby/core/enumerable/fixtures/classes.rb
+++ b/spec/ruby/core/enumerable/fixtures/classes.rb
@@ -251,7 +251,7 @@ module EnumerableSpecs
end
end
- class ComparableWithFixnum
+ class ComparableWithInteger
include Comparable
def initialize(num)
@num = num
diff --git a/spec/ruby/core/enumerable/sort_spec.rb b/spec/ruby/core/enumerable/sort_spec.rb
index cff1a59986..6fc64f325e 100644
--- a/spec/ruby/core/enumerable/sort_spec.rb
+++ b/spec/ruby/core/enumerable/sort_spec.rb
@@ -31,7 +31,7 @@ describe "Enumerable#sort" do
it "compare values returned by block with 0" do
EnumerableSpecs::Numerous.new.sort { |n, m| -(n+m) * (n <=> m) }.should == [6, 5, 4, 3, 2, 1]
EnumerableSpecs::Numerous.new.sort { |n, m|
- EnumerableSpecs::ComparableWithFixnum.new(-(n+m) * (n <=> m))
+ EnumerableSpecs::ComparableWithInteger.new(-(n+m) * (n <=> m))
}.should == [6, 5, 4, 3, 2, 1]
-> {
EnumerableSpecs::Numerous.new.sort { |n, m| (n <=> m).to_s }
diff --git a/spec/ruby/core/enumerator/initialize_spec.rb b/spec/ruby/core/enumerator/initialize_spec.rb
index 53bf5d4ef2..45bd650d7f 100644
--- a/spec/ruby/core/enumerator/initialize_spec.rb
+++ b/spec/ruby/core/enumerator/initialize_spec.rb
@@ -43,7 +43,7 @@ describe "Enumerator#initialize" do
@uninitialized.send(:initialize, Float::INFINITY) {}.size.should equal(Float::INFINITY)
end
- it "sets size to the given size if the given size is a Fixnum" do
+ it "sets size to the given size if the given size is an Integer" do
@uninitialized.send(:initialize, 100) {}.size.should == 100
end
diff --git a/spec/ruby/core/enumerator/lazy/initialize_spec.rb b/spec/ruby/core/enumerator/lazy/initialize_spec.rb
index 88c66530b9..f23018d010 100644
--- a/spec/ruby/core/enumerator/lazy/initialize_spec.rb
+++ b/spec/ruby/core/enumerator/lazy/initialize_spec.rb
@@ -43,7 +43,7 @@ describe "Enumerator::Lazy#initialize" do
@uninitialized.send(:initialize, @receiver, Float::INFINITY) {}.size.should equal(Float::INFINITY)
end
- it "sets given size to own size if the given size is a Fixnum" do
+ it "sets given size to own size if the given size is an Integer" do
@uninitialized.send(:initialize, @receiver, 100) {}.size.should == 100
end
diff --git a/spec/ruby/core/exception/system_call_error_spec.rb b/spec/ruby/core/exception/system_call_error_spec.rb
index f27977a547..73167bc288 100644
--- a/spec/ruby/core/exception/system_call_error_spec.rb
+++ b/spec/ruby/core/exception/system_call_error_spec.rb
@@ -31,7 +31,7 @@ describe "SystemCallError.new" do
-> { SystemCallError.new }.should raise_error(ArgumentError)
end
- it "accepts single Fixnum argument as errno" do
+ it "accepts single Integer argument as errno" do
SystemCallError.new(-2**24).errno.should == -2**24
SystemCallError.new(-1).errno.should == -1
SystemCallError.new(0).errno.should == 0
diff --git a/spec/ruby/core/file/size_spec.rb b/spec/ruby/core/file/size_spec.rb
index a2bf408da1..11d20cbacb 100644
--- a/spec/ruby/core/file/size_spec.rb
+++ b/spec/ruby/core/file/size_spec.rb
@@ -59,8 +59,8 @@ describe "File#size" do
@file.respond_to?(:size).should be_true
end
- it "returns the file's size as a Fixnum" do
- @file.size.should be_an_instance_of(Fixnum)
+ it "returns the file's size as an Integer" do
+ @file.size.should be_an_instance_of(Integer)
end
it "returns the file's size in bytes" do
diff --git a/spec/ruby/core/file/umask_spec.rb b/spec/ruby/core/file/umask_spec.rb
index 2640e3c316..7f7e40abbc 100644
--- a/spec/ruby/core/file/umask_spec.rb
+++ b/spec/ruby/core/file/umask_spec.rb
@@ -12,8 +12,8 @@ describe "File.umask" do
File.umask(@orig_umask)
end
- it "returns a Fixnum" do
- File.umask.should be_kind_of(Fixnum)
+ it "returns an Integer" do
+ File.umask.should be_kind_of(Integer)
end
platform_is_not :windows do
diff --git a/spec/ruby/core/float/comparison_spec.rb b/spec/ruby/core/float/comparison_spec.rb
index 51bb5a52db..cbab3a0fa1 100644
--- a/spec/ruby/core/float/comparison_spec.rb
+++ b/spec/ruby/core/float/comparison_spec.rb
@@ -48,7 +48,7 @@ describe "Float#<=>" do
# The 4 tests below are taken from matz's revision 23730 for Ruby trunk
#
- it "returns 1 when self is Infinity and other is a Bignum" do
+ it "returns 1 when self is Infinity and other is an Integer" do
(infinity_value <=> Float::MAX.to_i*2).should == 1
end
diff --git a/spec/ruby/core/float/shared/quo.rb b/spec/ruby/core/float/shared/quo.rb
index 3487824f70..0c90171b87 100644
--- a/spec/ruby/core/float/shared/quo.rb
+++ b/spec/ruby/core/float/shared/quo.rb
@@ -1,9 +1,9 @@
describe :float_quo, shared: true do
- it "performs floating-point division between self and a Fixnum" do
+ it "performs floating-point division between self and an Integer" do
8.9.send(@method, 7).should == 1.2714285714285716
end
- it "performs floating-point division between self and a Bignum" do
+ it "performs floating-point division between self and an Integer" do
8.9.send(@method, 9999999999999**9).should == 8.900000000008011e-117
end
diff --git a/spec/ruby/core/hash/shared/store.rb b/spec/ruby/core/hash/shared/store.rb
index eca0e5a8e8..b823ea45ca 100644
--- a/spec/ruby/core/hash/shared/store.rb
+++ b/spec/ruby/core/hash/shared/store.rb
@@ -36,7 +36,7 @@ describe :hash_store, shared: true do
h[key].should == "foo"
end
- it " accepts keys with a Bignum hash" do
+ it " accepts keys with an Integer hash" do
o = mock(hash: 1 << 100)
h = {}
h[o] = 1
diff --git a/spec/ruby/core/integer/coerce_spec.rb b/spec/ruby/core/integer/coerce_spec.rb
index 9a19baf2ea..4d540bfb87 100644
--- a/spec/ruby/core/integer/coerce_spec.rb
+++ b/spec/ruby/core/integer/coerce_spec.rb
@@ -4,10 +4,10 @@ require 'bigdecimal'
describe "Integer#coerce" do
context "fixnum" do
- describe "when given a Fixnum" do
- it "returns an array containing two Fixnums" do
+ describe "when given an Integer" do
+ it "returns an array containing two Integers" do
1.coerce(2).should == [2, 1]
- 1.coerce(2).map { |i| i.class }.should == [Fixnum, Fixnum]
+ 1.coerce(2).map { |i| i.class }.should == [Integer, Integer]
end
end
@@ -42,26 +42,26 @@ describe "Integer#coerce" do
end
context "bignum" do
- it "coerces other to a Bignum and returns [other, self] when passed a Fixnum" do
+ it "coerces other to an Integer and returns [other, self] when passed an Integer" do
a = bignum_value
ary = a.coerce(2)
- ary[0].should be_kind_of(Bignum)
- ary[1].should be_kind_of(Bignum)
+ ary[0].should be_kind_of(Integer)
+ ary[1].should be_kind_of(Integer)
ary.should == [2, a]
end
- it "returns [other, self] when passed a Bignum" do
+ it "returns [other, self] when passed an Integer" do
a = bignum_value
b = bignum_value
ary = a.coerce(b)
- ary[0].should be_kind_of(Bignum)
- ary[1].should be_kind_of(Bignum)
+ ary[0].should be_kind_of(Integer)
+ ary[1].should be_kind_of(Integer)
ary.should == [b, a]
end
- it "raises a TypeError when not passed a Fixnum or Bignum" do
+ it "raises a TypeError when not passed an Integer" do
a = bignum_value
-> { a.coerce(nil) }.should raise_error(TypeError)
diff --git a/spec/ruby/core/integer/comparison_spec.rb b/spec/ruby/core/integer/comparison_spec.rb
index db050aa8b9..a0d8d24119 100644
--- a/spec/ruby/core/integer/comparison_spec.rb
+++ b/spec/ruby/core/integer/comparison_spec.rb
@@ -27,7 +27,7 @@ describe "Integer#<=>" do
end
context "bignum" do
- describe "with a Fixnum" do
+ describe "with an Integer" do
it "returns -1 when other is larger" do
(-bignum_value <=> 2).should == -1
end
@@ -37,7 +37,7 @@ describe "Integer#<=>" do
end
end
- describe "with a Bignum" do
+ describe "with an Integer" do
describe "when other is negative" do
it "returns -1 when self is negative and other is larger" do
(-bignum_value(42) <=> -bignum_value).should == -1
@@ -116,7 +116,7 @@ describe "Integer#<=>" do
describe "with an Object" do
before :each do
@big = bignum_value
- @num = mock("value for Bignum#<=>")
+ @num = mock("value for Integer#<=>")
end
it "calls #coerce on other" do
@@ -158,7 +158,7 @@ describe "Integer#<=>" do
end
# The tests below are taken from matz's revision 23730 for Ruby trunk
- it "returns 1 when self is Infinity and other is a Bignum" do
+ it "returns 1 when self is Infinity and other is an Integer" do
(infinity_value <=> Float::MAX.to_i*2).should == 1
end
diff --git a/spec/ruby/core/integer/constants_spec.rb b/spec/ruby/core/integer/constants_spec.rb
index 3b8b01e330..35601f82b9 100644
--- a/spec/ruby/core/integer/constants_spec.rb
+++ b/spec/ruby/core/integer/constants_spec.rb
@@ -1,25 +1,27 @@
require_relative '../../spec_helper'
-describe "Fixnum" do
- it "is unified into Integer" do
- suppress_warning do
- Fixnum.should equal(Integer)
+ruby_version_is ""..."3.0" do
+ describe "Fixnum" do
+ it "is unified into Integer" do
+ suppress_warning do
+ Fixnum.should equal(Integer)
+ end
end
- end
- it "is deprecated" do
- -> { Fixnum }.should complain(/constant ::Fixnum is deprecated/)
+ it "is deprecated" do
+ -> { Fixnum }.should complain(/constant ::Fixnum is deprecated/)
+ end
end
-end
-describe "Bignum" do
- it "is unified into Integer" do
- suppress_warning do
- Bignum.should equal(Integer)
+ describe "Bignum" do
+ it "is unified into Integer" do
+ suppress_warning do
+ Bignum.should equal(Integer)
+ end
end
- end
- it "is deprecated" do
- -> { Bignum }.should complain(/constant ::Bignum is deprecated/)
+ it "is deprecated" do
+ -> { Bignum }.should complain(/constant ::Bignum is deprecated/)
+ end
end
end
diff --git a/spec/ruby/core/integer/denominator_spec.rb b/spec/ruby/core/integer/denominator_spec.rb
index c1477d0757..d19b8175a3 100644
--- a/spec/ruby/core/integer/denominator_spec.rb
+++ b/spec/ruby/core/integer/denominator_spec.rb
@@ -7,7 +7,7 @@ describe "Integer#denominator" do
@numbers = [
20, # Integer
-2709, # Negative Integer
- 99999999**99, # Bignum
+ 99999999**99, # Integer
-99999**621, # Negative BigNum
0,
1
diff --git a/spec/ruby/core/integer/div_spec.rb b/spec/ruby/core/integer/div_spec.rb
index 087d012fe0..bc1c4363d4 100644
--- a/spec/ruby/core/integer/div_spec.rb
+++ b/spec/ruby/core/integer/div_spec.rb
@@ -36,7 +36,7 @@ describe "Integer#div" do
10.div(y).should == result
end
- it "coerces self and the given argument to Floats and returns self divided by other as Fixnum" do
+ it "coerces self and the given argument to Floats and returns self divided by other as Integer" do
1.div(0.2).should == 5
1.div(0.16).should == 6
1.div(0.169).should == 5
diff --git a/spec/ruby/core/integer/downto_spec.rb b/spec/ruby/core/integer/downto_spec.rb
index af7a7e36b9..987704b02e 100644
--- a/spec/ruby/core/integer/downto_spec.rb
+++ b/spec/ruby/core/integer/downto_spec.rb
@@ -1,6 +1,6 @@
require_relative '../../spec_helper'
-describe "Integer#downto [stop] when self and stop are Fixnums" do
+describe "Integer#downto [stop] when self and stop are Integers" do
it "does not yield when stop is greater than self" do
result = []
5.downto(6) { |x| result << x }
diff --git a/spec/ruby/core/integer/element_reference_spec.rb b/spec/ruby/core/integer/element_reference_spec.rb
index 4c236a11e7..6e65c50254 100644
--- a/spec/ruby/core/integer/element_reference_spec.rb
+++ b/spec/ruby/core/integer/element_reference_spec.rb
@@ -68,14 +68,14 @@ describe "Integer#[]" do
-> { 3[obj] }.should raise_error(TypeError)
end
- it "calls #to_int to coerce a String to a Bignum and returns 0" do
+ it "calls #to_int to coerce a String to an Integer and returns 0" do
obj = mock('bignum value')
obj.should_receive(:to_int).and_return(bignum_value)
3[obj].should == 0
end
- it "returns 0 when passed a Float in the range of a Bignum" do
+ it "returns 0 when passed a Float in the range of an Integer" do
3[bignum_value.to_f].should == 0
end
diff --git a/spec/ruby/core/integer/even_spec.rb b/spec/ruby/core/integer/even_spec.rb
index a314cc6b19..a93f54c74e 100644
--- a/spec/ruby/core/integer/even_spec.rb
+++ b/spec/ruby/core/integer/even_spec.rb
@@ -2,7 +2,7 @@ require_relative '../../spec_helper'
describe "Integer#even?" do
context "fixnum" do
- it "returns true for a Fixnum when it is an even number" do
+ it "returns true for an Integer when it is an even number" do
(-2).even?.should be_true
(-1).even?.should be_false
@@ -11,7 +11,7 @@ describe "Integer#even?" do
2.even?.should be_true
end
- it "returns true for a Bignum when it is an even number" do
+ it "returns true for an Integer when it is an even number" do
bignum_value(0).even?.should be_true
bignum_value(1).even?.should be_false
diff --git a/spec/ruby/core/integer/gcd_spec.rb b/spec/ruby/core/integer/gcd_spec.rb
index 8aa654a16a..82086d742a 100644
--- a/spec/ruby/core/integer/gcd_spec.rb
+++ b/spec/ruby/core/integer/gcd_spec.rb
@@ -31,15 +31,15 @@ describe "Integer#gcd" do
-100.gcd(-100).should == 100
end
- it "accepts a Bignum argument" do
+ it "accepts an Integer argument" do
bignum = 9999**99
- bignum.should be_kind_of(Bignum)
+ bignum.should be_kind_of(Integer)
99.gcd(bignum).should == 99
end
- it "works if self is a Bignum" do
+ it "works if self is an Integer" do
bignum = 9999**99
- bignum.should be_kind_of(Bignum)
+ bignum.should be_kind_of(Integer)
bignum.gcd(99).should == 99
end
diff --git a/spec/ruby/core/integer/gcdlcm_spec.rb b/spec/ruby/core/integer/gcdlcm_spec.rb
index 5b3669e62a..2915750f88 100644
--- a/spec/ruby/core/integer/gcdlcm_spec.rb
+++ b/spec/ruby/core/integer/gcdlcm_spec.rb
@@ -26,15 +26,15 @@ describe "Integer#gcdlcm" do
200.gcdlcm(20)[1].should == 200.lcm(20)
end
- it "accepts a Bignum argument" do
+ it "accepts an Integer argument" do
bignum = 91999**99
- bignum.should be_kind_of(Bignum)
+ bignum.should be_kind_of(Integer)
99.gcdlcm(bignum).should == [99.gcd(bignum), 99.lcm(bignum)]
end
- it "works if self is a Bignum" do
+ it "works if self is an Integer" do
bignum = 9999**89
- bignum.should be_kind_of(Bignum)
+ bignum.should be_kind_of(Integer)
bignum.gcdlcm(99).should == [bignum.gcd(99), bignum.lcm(99)]
end
diff --git a/spec/ruby/core/integer/lcm_spec.rb b/spec/ruby/core/integer/lcm_spec.rb
index 77d3ad3488..39976ea474 100644
--- a/spec/ruby/core/integer/lcm_spec.rb
+++ b/spec/ruby/core/integer/lcm_spec.rb
@@ -31,15 +31,15 @@ describe "Integer#lcm" do
-100.lcm(-100).should == 100
end
- it "accepts a Bignum argument" do
+ it "accepts an Integer argument" do
bignum = 9999**99
- bignum.should be_kind_of(Bignum)
+ bignum.should be_kind_of(Integer)
99.lcm(bignum).should == bignum
end
- it "works if self is a Bignum" do
+ it "works if self is an Integer" do
bignum = 9999**99
- bignum.should be_kind_of(Bignum)
+ bignum.should be_kind_of(Integer)
bignum.lcm(99).should == bignum
end
diff --git a/spec/ruby/core/integer/left_shift_spec.rb b/spec/ruby/core/integer/left_shift_spec.rb
index f9a8c9bbd1..d2ffe4bbeb 100644
--- a/spec/ruby/core/integer/left_shift_spec.rb
+++ b/spec/ruby/core/integer/left_shift_spec.rb
@@ -52,19 +52,19 @@ describe "Integer#<< (with n << m)" do
(-7 << -64).should == -1
end
- it "returns 0 when m < 0 and m is a Bignum" do
+ it "returns 0 when m < 0 and m is an Integer" do
(3 << -bignum_value).should == 0
end
- it "returns an Bignum == fixnum_max * 2 when fixnum_max << 1 and n > 0" do
+ it "returns an Integer == fixnum_max * 2 when fixnum_max << 1 and n > 0" do
result = fixnum_max << 1
- result.should be_an_instance_of(Bignum)
+ result.should be_an_instance_of(Integer)
result.should == fixnum_max * 2
end
- it "returns an Bignum == fixnum_min * 2 when fixnum_min << 1 and n < 0" do
+ it "returns an Integer == fixnum_min * 2 when fixnum_min << 1 and n < 0" do
result = fixnum_min << 1
- result.should be_an_instance_of(Bignum)
+ result.should be_an_instance_of(Integer)
result.should == fixnum_min * 2
end
@@ -127,19 +127,19 @@ describe "Integer#<< (with n << m)" do
(@bignum << -68).should == 0
end
- it "returns 0 when m < 0 and m is a Bignum" do
+ it "returns 0 when m < 0 and m is an Integer" do
(@bignum << -bignum_value).should == 0
end
- it "returns a Fixnum == fixnum_max when (fixnum_max * 2) << -1 and n > 0" do
+ it "returns an Integer == fixnum_max when (fixnum_max * 2) << -1 and n > 0" do
result = (fixnum_max * 2) << -1
- result.should be_an_instance_of(Fixnum)
+ result.should be_an_instance_of(Integer)
result.should == fixnum_max
end
- it "returns a Fixnum == fixnum_min when (fixnum_min * 2) << -1 and n < 0" do
+ it "returns an Integer == fixnum_min when (fixnum_min * 2) << -1 and n < 0" do
result = (fixnum_min * 2) << -1
- result.should be_an_instance_of(Fixnum)
+ result.should be_an_instance_of(Integer)
result.should == fixnum_min
end
diff --git a/spec/ruby/core/integer/right_shift_spec.rb b/spec/ruby/core/integer/right_shift_spec.rb
index 1eac6cb5bc..62cbe862b9 100644
--- a/spec/ruby/core/integer/right_shift_spec.rb
+++ b/spec/ruby/core/integer/right_shift_spec.rb
@@ -56,15 +56,15 @@ describe "Integer#>> (with n >> m)" do
(3 >> bignum_value).should == 0
end
- it "returns an Bignum == fixnum_max * 2 when fixnum_max >> -1 and n > 0" do
+ it "returns an Integer == fixnum_max * 2 when fixnum_max >> -1 and n > 0" do
result = fixnum_max >> -1
- result.should be_an_instance_of(Bignum)
+ result.should be_an_instance_of(Integer)
result.should == fixnum_max * 2
end
- it "returns an Bignum == fixnum_min * 2 when fixnum_min >> -1 and n < 0" do
+ it "returns an Integer == fixnum_min * 2 when fixnum_min >> -1 and n < 0" do
result = fixnum_min >> -1
- result.should be_an_instance_of(Bignum)
+ result.should be_an_instance_of(Integer)
result.should == fixnum_min * 2
end
@@ -153,19 +153,19 @@ describe "Integer#>> (with n >> m)" do
(@bignum >> 68).should == 0
end
- it "returns 0 when m is a Bignum" do
+ it "returns 0 when m is an Integer" do
(@bignum >> bignum_value).should == 0
end
- it "returns a Fixnum == fixnum_max when (fixnum_max * 2) >> 1 and n > 0" do
+ it "returns an Integer == fixnum_max when (fixnum_max * 2) >> 1 and n > 0" do
result = (fixnum_max * 2) >> 1
- result.should be_an_instance_of(Fixnum)
+ result.should be_an_instance_of(Integer)
result.should == fixnum_max
end
- it "returns a Fixnum == fixnum_min when (fixnum_min * 2) >> 1 and n < 0" do
+ it "returns an Integer == fixnum_min when (fixnum_min * 2) >> 1 and n < 0" do
result = (fixnum_min * 2) >> 1
- result.should be_an_instance_of(Fixnum)
+ result.should be_an_instance_of(Integer)
result.should == fixnum_min
end
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
diff --git a/spec/ruby/core/integer/to_r_spec.rb b/spec/ruby/core/integer/to_r_spec.rb
index 4a40575b7f..ac998e2a30 100644
--- a/spec/ruby/core/integer/to_r_spec.rb
+++ b/spec/ruby/core/integer/to_r_spec.rb
@@ -13,9 +13,9 @@ describe "Integer#to_r" do
298.to_r.denominator.should == 1
end
- it "works even if self is a Bignum" do
+ it "works even if self is an Integer" do
bignum = 99999**999
- bignum.should be_an_instance_of(Bignum)
+ bignum.should be_an_instance_of(Integer)
bignum.to_r.should == Rational(bignum, 1)
end
diff --git a/spec/ruby/core/integer/uminus_spec.rb b/spec/ruby/core/integer/uminus_spec.rb
index b6b110dec4..efaed1d2a6 100644
--- a/spec/ruby/core/integer/uminus_spec.rb
+++ b/spec/ruby/core/integer/uminus_spec.rb
@@ -10,7 +10,7 @@ describe "Integer#-@" do
-8.send(:-@).should == 8
end
- it "negates self at Fixnum/Bignum boundaries" do
+ it "negates self at Integer/Integer boundaries" do
(-fixnum_max).should == (0 - fixnum_max)
(-fixnum_max).should < 0
(-fixnum_min).should == (0 - fixnum_min)
diff --git a/spec/ruby/core/integer/upto_spec.rb b/spec/ruby/core/integer/upto_spec.rb
index 6049eb173e..dd6995e94b 100644
--- a/spec/ruby/core/integer/upto_spec.rb
+++ b/spec/ruby/core/integer/upto_spec.rb
@@ -1,6 +1,6 @@
require_relative '../../spec_helper'
-describe "Integer#upto [stop] when self and stop are Fixnums" do
+describe "Integer#upto [stop] when self and stop are Integers" do
it "does not yield when stop is less than self" do
result = []
5.upto(4) { |x| result << x }
diff --git a/spec/ruby/core/io/initialize_spec.rb b/spec/ruby/core/io/initialize_spec.rb
index c0d84765a8..ba5bc117b7 100644
--- a/spec/ruby/core/io/initialize_spec.rb
+++ b/spec/ruby/core/io/initialize_spec.rb
@@ -13,7 +13,7 @@ describe "IO#initialize" do
rm_r @name
end
- it "reassociates the IO instance with the new descriptor when passed a Fixnum" do
+ it "reassociates the IO instance with the new descriptor when passed an Integer" do
fd = new_fd @name, "r:utf-8"
@io.send :initialize, fd, 'r'
@io.fileno.should == fd
diff --git a/spec/ruby/core/io/shared/new.rb b/spec/ruby/core/io/shared/new.rb
index 75c532053f..f2a0970a40 100644
--- a/spec/ruby/core/io/shared/new.rb
+++ b/spec/ruby/core/io/shared/new.rb
@@ -18,7 +18,7 @@ describe :io_new, shared: true do
rm_r @name
end
- it "creates an IO instance from a Fixnum argument" do
+ it "creates an IO instance from an Integer argument" do
@io = IO.send(@method, @fd, "w")
@io.should be_an_instance_of(IO)
end
@@ -55,7 +55,7 @@ describe :io_new, shared: true do
end
end
- it "calls #to_int on an object to convert to a Fixnum" do
+ it "calls #to_int on an object to convert to an Integer" do
obj = mock("file descriptor")
obj.should_receive(:to_int).and_return(@fd)
@io = IO.send(@method, obj, "w")
diff --git a/spec/ruby/core/io/shared/pos.rb b/spec/ruby/core/io/shared/pos.rb
index 0b4d1e13b3..d83a6c6692 100644
--- a/spec/ruby/core/io/shared/pos.rb
+++ b/spec/ruby/core/io/shared/pos.rb
@@ -60,7 +60,7 @@ describe :io_set_pos, shared: true do
end
end
- it "does not accept Bignums that don't fit in a C long" do
+ it "does not accept Integers that don't fit in a C long" do
File.open @fname do |io|
-> { io.send @method, 2**128 }.should raise_error(RangeError)
end
diff --git a/spec/ruby/core/io/shared/readlines.rb b/spec/ruby/core/io/shared/readlines.rb
index 339684a5d4..8e4a73bb98 100644
--- a/spec/ruby/core/io/shared/readlines.rb
+++ b/spec/ruby/core/io/shared/readlines.rb
@@ -54,7 +54,7 @@ describe :io_readlines_options_19, shared: true do
(result ? result : ScratchPad.recorded).should == IOSpecs.lines_space_separator
end
- describe "when the object is a Fixnum" do
+ describe "when the object is an Integer" do
before :each do
@sep = $/
end
@@ -69,7 +69,7 @@ describe :io_readlines_options_19, shared: true do
(result ? result : ScratchPad.recorded).should == IOSpecs.lines_space_separator_limit
end
- it "uses the object as a limit if it is a Fixnum" do
+ it "uses the object as a limit if it is an Integer" do
result = IO.send(@method, @name, 10, &@object)
(result ? result : ScratchPad.recorded).should == IOSpecs.lines_limit
end
@@ -96,7 +96,7 @@ describe :io_readlines_options_19, shared: true do
end
describe "when passed name, object, object" do
- describe "when the first object is a Fixnum" do
+ describe "when the first object is an Integer" do
it "uses the second object as an options Hash" do
-> do
IO.send(@method, @filename, 10, mode: "w", &@object)
@@ -113,7 +113,7 @@ describe :io_readlines_options_19, shared: true do
end
describe "when the first object is a String" do
- it "uses the second object as a limit if it is a Fixnum" do
+ it "uses the second object as a limit if it is an Integer" do
result = IO.send(@method, @name, " ", 10, &@object)
(result ? result : ScratchPad.recorded).should == IOSpecs.lines_space_separator_limit
end
@@ -140,7 +140,7 @@ describe :io_readlines_options_19, shared: true do
end
end
- describe "when the first object is not a String or Fixnum" do
+ describe "when the first object is not a String or Integer" do
it "calls #to_str to convert the object to a String" do
sep = mock("io readlines separator")
sep.should_receive(:to_str).at_least(1).and_return(" ")
@@ -148,7 +148,7 @@ describe :io_readlines_options_19, shared: true do
(result ? result : ScratchPad.recorded).should == IOSpecs.lines_space_separator_limit
end
- it "uses the second object as a limit if it is a Fixnum" do
+ it "uses the second object as a limit if it is an Integer" do
result = IO.send(@method, @name, " ", 10, mode: "r", &@object)
(result ? result : ScratchPad.recorded).should == IOSpecs.lines_space_separator_limit
end
diff --git a/spec/ruby/core/io/sysopen_spec.rb b/spec/ruby/core/io/sysopen_spec.rb
index 4607d13687..7ad379df3a 100644
--- a/spec/ruby/core/io/sysopen_spec.rb
+++ b/spec/ruby/core/io/sysopen_spec.rb
@@ -13,7 +13,7 @@ describe "IO.sysopen" do
it "returns the file descriptor for a given path" do
@fd = IO.sysopen(@filename, "w")
- @fd.should be_kind_of(Fixnum)
+ @fd.should be_kind_of(Integer)
@fd.should_not equal(0)
end
@@ -21,7 +21,7 @@ describe "IO.sysopen" do
platform_is_not :windows do
it "works on directories" do
@fd = IO.sysopen(tmp("")) # /tmp
- @fd.should be_kind_of(Fixnum)
+ @fd.should be_kind_of(Integer)
@fd.should_not equal(0)
end
end
diff --git a/spec/ruby/core/io/ungetbyte_spec.rb b/spec/ruby/core/io/ungetbyte_spec.rb
index 9d189f8abb..1e2ec77e1f 100644
--- a/spec/ruby/core/io/ungetbyte_spec.rb
+++ b/spec/ruby/core/io/ungetbyte_spec.rb
@@ -37,12 +37,12 @@ describe "IO#ungetbyte" do
end
ruby_version_is ''...'2.6' do
- it "puts back one byte for a Fixnum argument..." do
+ it "puts back one byte for an Integer argument..." do
@io.ungetbyte(4095).should be_nil
@io.getbyte.should == 255
end
- it "... but not for Bignum argument (eh?)" do
+ it "... but not for Integer argument (eh?)" do
-> {
@io.ungetbyte(0x4f7574206f6620636861722072616e6765)
}.should raise_error(TypeError)
diff --git a/spec/ruby/core/kernel/Float_spec.rb b/spec/ruby/core/kernel/Float_spec.rb
index af64fcbe86..ce224cada9 100644
--- a/spec/ruby/core/kernel/Float_spec.rb
+++ b/spec/ruby/core/kernel/Float_spec.rb
@@ -9,7 +9,7 @@ describe :kernel_float, shared: true do
float2.should equal float
end
- it "returns a Float for Fixnums" do
+ it "returns a Float for Integers" do
@object.send(:Float, 1).should == 1.0
end
@@ -17,7 +17,7 @@ describe :kernel_float, shared: true do
@object.send(:Float, Complex(1)).should == 1.0
end
- it "returns a Float for Bignums" do
+ it "returns a Float for Integers" do
@object.send(:Float, 1000000000000).should == 1000000000000.0
end
diff --git a/spec/ruby/core/kernel/Integer_spec.rb b/spec/ruby/core/kernel/Integer_spec.rb
index 59b41d37e6..674c7dd185 100644
--- a/spec/ruby/core/kernel/Integer_spec.rb
+++ b/spec/ruby/core/kernel/Integer_spec.rb
@@ -2,11 +2,11 @@ require_relative '../../spec_helper'
require_relative 'fixtures/classes'
describe :kernel_integer, shared: true do
- it "returns a Bignum for a Bignum" do
+ it "returns an Integer for an Integer" do
Integer(2e100).should == 2e100
end
- it "returns a Fixnum for a Fixnum" do
+ it "returns an Integer for an Integer" do
Integer(100).should == 100
end
@@ -39,9 +39,9 @@ describe :kernel_integer, shared: true do
-> { Integer(nil) }.should raise_error(TypeError)
end
- it "returns a Fixnum or Bignum object" do
- Integer(2).should be_an_instance_of(Fixnum)
- Integer(9**99).should be_an_instance_of(Bignum)
+ it "returns an Integer or Integer object" do
+ Integer(2).should be_an_instance_of(Integer)
+ Integer(9**99).should be_an_instance_of(Integer)
end
it "truncates Floats" do
@@ -54,14 +54,14 @@ describe :kernel_integer, shared: true do
Integer(3.quo(2)).should == 1
end
- it "returns the value of to_int if the result is a Fixnum" do
+ it "returns the value of to_int if the result is an Integer" do
obj = mock("object")
obj.should_receive(:to_int).and_return(1)
obj.should_not_receive(:to_i)
Integer(obj).should == 1
end
- it "returns the value of to_int if the result is a Bignum" do
+ it "returns the value of to_int if the result is an Integer" do
obj = mock("object")
obj.should_receive(:to_int).and_return(2 * 10**100)
obj.should_not_receive(:to_i)
diff --git a/spec/ruby/core/kernel/class_spec.rb b/spec/ruby/core/kernel/class_spec.rb
index 4d3b4e549b..2725bde19b 100644
--- a/spec/ruby/core/kernel/class_spec.rb
+++ b/spec/ruby/core/kernel/class_spec.rb
@@ -5,7 +5,7 @@ describe "Kernel#class" do
it "returns the class of the object" do
Object.new.class.should equal(Object)
- 1.class.should equal(Fixnum)
+ 1.class.should equal(Integer)
3.14.class.should equal(Float)
:hello.class.should equal(Symbol)
"hello".class.should equal(String)
diff --git a/spec/ruby/core/kernel/instance_variable_get_spec.rb b/spec/ruby/core/kernel/instance_variable_get_spec.rb
index 84d3188f07..bb6f03d3bf 100644
--- a/spec/ruby/core/kernel/instance_variable_get_spec.rb
+++ b/spec/ruby/core/kernel/instance_variable_get_spec.rb
@@ -92,7 +92,7 @@ describe "Kernel#instance_variable_get when passed String" do
end
end
-describe "Kernel#instance_variable_get when passed Fixnum" do
+describe "Kernel#instance_variable_get when passed Integer" do
before :each do
@obj = Object.new
@obj.instance_variable_set("@test", :test)
diff --git a/spec/ruby/core/kernel/instance_variable_set_spec.rb b/spec/ruby/core/kernel/instance_variable_set_spec.rb
index 12b2185878..7fda30f72c 100644
--- a/spec/ruby/core/kernel/instance_variable_set_spec.rb
+++ b/spec/ruby/core/kernel/instance_variable_set_spec.rb
@@ -31,7 +31,7 @@ describe "Kernel#instance_variable_set" do
-> { dog_at.new.instance_variable_set(:"@", "cat") }.should raise_error(NameError)
end
- it "raises a TypeError if the instance variable name is a Fixnum" do
+ it "raises a TypeError if the instance variable name is an Integer" do
-> { "".instance_variable_set(1, 2) }.should raise_error(TypeError)
end
diff --git a/spec/ruby/core/kernel/shared/require.rb b/spec/ruby/core/kernel/shared/require.rb
index 4e0322025c..d656b3b2f2 100644
--- a/spec/ruby/core/kernel/shared/require.rb
+++ b/spec/ruby/core/kernel/shared/require.rb
@@ -60,7 +60,7 @@ describe :kernel_require_basic, shared: true do
-> { @object.send(@method, nil) }.should raise_error(TypeError)
end
- it "raises a TypeError if passed a Fixnum" do
+ it "raises a TypeError if passed an Integer" do
-> { @object.send(@method, 42) }.should raise_error(TypeError)
end
diff --git a/spec/ruby/core/kernel/singleton_class_spec.rb b/spec/ruby/core/kernel/singleton_class_spec.rb
index 5dbb4f8c05..a8bcd916d1 100644
--- a/spec/ruby/core/kernel/singleton_class_spec.rb
+++ b/spec/ruby/core/kernel/singleton_class_spec.rb
@@ -17,7 +17,7 @@ describe "Kernel#singleton_class" do
false.singleton_class.should == FalseClass
end
- it "raises TypeError for Fixnum" do
+ it "raises TypeError for Integer" do
-> { 123.singleton_class }.should raise_error(TypeError)
end
diff --git a/spec/ruby/core/kernel/sleep_spec.rb b/spec/ruby/core/kernel/sleep_spec.rb
index 387dc4787b..71a3f24f13 100644
--- a/spec/ruby/core/kernel/sleep_spec.rb
+++ b/spec/ruby/core/kernel/sleep_spec.rb
@@ -14,7 +14,7 @@ describe "Kernel#sleep" do
sleep(0.001).should >= 0
end
- it "accepts a Fixnum" do
+ it "accepts an Integer" do
sleep(0).should >= 0
end
diff --git a/spec/ruby/core/kernel/srand_spec.rb b/spec/ruby/core/kernel/srand_spec.rb
index 0985c76cb0..6774d19284 100644
--- a/spec/ruby/core/kernel/srand_spec.rb
+++ b/spec/ruby/core/kernel/srand_spec.rb
@@ -37,7 +37,7 @@ describe "Kernel.srand" do
srand.should == -17
end
- it "accepts a Bignum as a seed" do
+ it "accepts an Integer as a seed" do
srand(0x12345678901234567890)
srand.should == 0x12345678901234567890
end
diff --git a/spec/ruby/core/kernel/taint_spec.rb b/spec/ruby/core/kernel/taint_spec.rb
index 22b2c4d0a4..8ba9869af2 100644
--- a/spec/ruby/core/kernel/taint_spec.rb
+++ b/spec/ruby/core/kernel/taint_spec.rb
@@ -37,7 +37,7 @@ describe "Kernel#taint" do
v.should_not.tainted?
end
- it "no raises error on fixnum values" do
+ it "no raises error on integer values" do
[1].each do |v|
-> { v.taint }.should_not raise_error(RuntimeError)
v.should_not.tainted?
diff --git a/spec/ruby/core/marshal/dump_spec.rb b/spec/ruby/core/marshal/dump_spec.rb
index 8d6ba245af..0e50df7227 100644
--- a/spec/ruby/core/marshal/dump_spec.rb
+++ b/spec/ruby/core/marshal/dump_spec.rb
@@ -15,8 +15,8 @@ describe "Marshal.dump" do
Marshal.dump(false).should == "\004\bF"
end
- describe "with a Fixnum" do
- it "dumps a Fixnum" do
+ describe "with an Integer" do
+ it "dumps an Integer" do
[ [Marshal, 0, "\004\bi\000"],
[Marshal, 5, "\004\bi\n"],
[Marshal, 8, "\004\bi\r"],
@@ -38,11 +38,11 @@ describe "Marshal.dump" do
end
platform_is wordsize: 64 do
- it "dumps a positive Fixnum > 31 bits as a Bignum" do
+ it "dumps a positive Integer > 31 bits as an Integer" do
Marshal.dump(2**31 + 1).should == "\x04\bl+\a\x01\x00\x00\x80"
end
- it "dumps a negative Fixnum > 31 bits as a Bignum" do
+ it "dumps a negative Integer > 31 bits as an Integer" do
Marshal.dump(-2**31 - 1).should == "\x04\bl-\a\x01\x00\x00\x80"
end
end
@@ -157,14 +157,14 @@ describe "Marshal.dump" do
end
end
- describe "with a Bignum" do
- it "dumps a Bignum" do
+ describe "with an Integer" do
+ it "dumps an Integer" do
[ [Marshal, -4611686018427387903, "\004\bl-\t\377\377\377\377\377\377\377?"],
[Marshal, -2361183241434822606847, "\004\bl-\n\377\377\377\377\377\377\377\377\177\000"],
].should be_computed_by(:dump)
end
- it "dumps a Bignum" do
+ it "dumps an Integer" do
[ [Marshal, 2**64, "\004\bl+\n\000\000\000\000\000\000\000\000\001\000"],
[Marshal, 2**90, "\004\bl+\v#{"\000" * 11}\004"],
[Marshal, -2**63, "\004\bl-\t\000\000\000\000\000\000\000\200"],
diff --git a/spec/ruby/core/marshal/fixtures/marshal_data.rb b/spec/ruby/core/marshal/fixtures/marshal_data.rb
index 2931278290..bf58f4888d 100644
--- a/spec/ruby/core/marshal/fixtures/marshal_data.rb
+++ b/spec/ruby/core/marshal/fixtures/marshal_data.rb
@@ -227,36 +227,36 @@ module MarshalSpec
"\004\b:\010big"],
"Symbol big" => [('big' * 100).to_sym,
"\004\b:\002,\001#{'big' * 100}"],
- "Bignum -2**64" => [-2**64,
+ "Integer -2**64" => [-2**64,
"\004\bl-\n\000\000\000\000\000\000\000\000\001\000"],
- "Bignum -2**63" => [-2**63,
+ "Integer -2**63" => [-2**63,
"\004\bl-\t\000\000\000\000\000\000\000\200"],
- "Fixnum -2**24" => [-2**24,
+ "Integer -2**24" => [-2**24,
"\004\bi\375\000\000\000"],
- "Fixnum -4516727" => [-4516727,
+ "Integer -4516727" => [-4516727,
"\004\bi\375\211\024\273"],
- "Fixnum -2**16" => [-2**16,
+ "Integer -2**16" => [-2**16,
"\004\bi\376\000\000"],
- "Fixnum -2**8" => [-2**8,
+ "Integer -2**8" => [-2**8,
"\004\bi\377\000"],
- "Fixnum -123" => [-123,
+ "Integer -123" => [-123,
"\004\bi\200"],
- "Fixnum -124" => [-124, "\004\bi\377\204"],
- "Fixnum 0" => [0,
+ "Integer -124" => [-124, "\004\bi\377\204"],
+ "Integer 0" => [0,
"\004\bi\000"],
- "Fixnum 5" => [5,
+ "Integer 5" => [5,
"\004\bi\n"],
- "Fixnum 122" => [122, "\004\bi\177"],
- "Fixnum 123" => [123, "\004\bi\001{"],
- "Fixnum 2**8" => [2**8,
+ "Integer 122" => [122, "\004\bi\177"],
+ "Integer 123" => [123, "\004\bi\001{"],
+ "Integer 2**8" => [2**8,
"\004\bi\002\000\001"],
- "Fixnum 2**16" => [2**16,
+ "Integer 2**16" => [2**16,
"\004\bi\003\000\000\001"],
- "Fixnum 2**24" => [2**24,
+ "Integer 2**24" => [2**24,
"\004\bi\004\000\000\000\001"],
- "Bignum 2**64" => [2**64,
+ "Integer 2**64" => [2**64,
"\004\bl+\n\000\000\000\000\000\000\000\000\001\000"],
- "Bignum 2**90" => [2**90,
+ "Integer 2**90" => [2**90,
"\004\bl+\v#{"\000" * 11}\004"],
"Class String" => [String,
"\004\bc\vString"],
@@ -334,31 +334,31 @@ module MarshalSpec
"\004\b:\010big"],
"Symbol big" => [('big' * 100).to_sym,
"\004\b:\002,\001#{'big' * 100}"],
- "Bignum -2**64" => [-2**64,
+ "Integer -2**64" => [-2**64,
"\004\bl-\n\000\000\000\000\000\000\000\000\001\000"],
- "Bignum -2**63" => [-2**63,
+ "Integer -2**63" => [-2**63,
"\004\bl-\t\000\000\000\000\000\000\000\200"],
- "Fixnum -2**24" => [-2**24,
+ "Integer -2**24" => [-2**24,
"\004\bi\375\000\000\000"],
- "Fixnum -2**16" => [-2**16,
+ "Integer -2**16" => [-2**16,
"\004\bi\376\000\000"],
- "Fixnum -2**8" => [-2**8,
+ "Integer -2**8" => [-2**8,
"\004\bi\377\000"],
- "Fixnum -123" => [-123,
+ "Integer -123" => [-123,
"\004\bi\200"],
- "Fixnum 0" => [0,
+ "Integer 0" => [0,
"\004\bi\000"],
- "Fixnum 5" => [5,
+ "Integer 5" => [5,
"\004\bi\n"],
- "Fixnum 2**8" => [2**8,
+ "Integer 2**8" => [2**8,
"\004\bi\002\000\001"],
- "Fixnum 2**16" => [2**16,
+ "Integer 2**16" => [2**16,
"\004\bi\003\000\000\001"],
- "Fixnum 2**24" => [2**24,
+ "Integer 2**24" => [2**24,
"\004\bi\004\000\000\000\001"],
- "Bignum 2**64" => [2**64,
+ "Integer 2**64" => [2**64,
"\004\bl+\n\000\000\000\000\000\000\000\000\001\000"],
- "Bignum 2**90" => [2**90,
+ "Integer 2**90" => [2**90,
"\004\bl+\v#{"\000" * 11}\004"],
"Class String" => [String,
"\004\bc\vString"],
diff --git a/spec/ruby/core/marshal/shared/load.rb b/spec/ruby/core/marshal/shared/load.rb
index e63fd8adda..9d42b9df4a 100644
--- a/spec/ruby/core/marshal/shared/load.rb
+++ b/spec/ruby/core/marshal/shared/load.rb
@@ -211,14 +211,14 @@ describe :marshal_load, shared: true do
y.first.tainted?.should be_false
end
- it "does not taint Fixnums" do
+ it "does not taint Integers" do
x = [1]
y = Marshal.send(@method, Marshal.dump(x).taint)
y.tainted?.should be_true
y.first.tainted?.should be_false
end
- it "does not taint Bignums" do
+ it "does not taint Integers" do
x = [bignum_value]
y = Marshal.send(@method, Marshal.dump(x).taint)
y.tainted?.should be_true
@@ -740,19 +740,19 @@ describe :marshal_load, shared: true do
end
end
- describe "for a Bignum" do
+ describe "for an Integer" do
platform_is wordsize: 64 do
- context "that is Bignum on 32-bit platforms but Fixnum on 64-bit" do
- it "dumps a Fixnum" do
+ context "that is Integer on 32-bit platforms but Integer on 64-bit" do
+ it "dumps an Integer" do
val = Marshal.send(@method, "\004\bl+\ab:wU")
val.should == 1433877090
- val.class.should == Fixnum
+ val.class.should == Integer
end
- it "dumps an array containing multiple references to the Bignum as an array of Fixnum" do
+ it "dumps an array containing multiple references to the Integer as an array of Integer" do
arr = Marshal.send(@method, "\004\b[\al+\a\223BwU@\006")
arr.should == [1433879187, 1433879187]
- arr.each { |v| v.class.should == Fixnum }
+ arr.each { |v| v.class.should == Integer }
end
end
end
diff --git a/spec/ruby/core/method/source_location_spec.rb b/spec/ruby/core/method/source_location_spec.rb
index 051739c57d..1f476aaa9b 100644
--- a/spec/ruby/core/method/source_location_spec.rb
+++ b/spec/ruby/core/method/source_location_spec.rb
@@ -16,9 +16,9 @@ describe "Method#source_location" do
file.should == File.realpath('../fixtures/classes.rb', __FILE__)
end
- it "sets the last value to a Fixnum representing the line on which the method was defined" do
+ it "sets the last value to an Integer representing the line on which the method was defined" do
line = @method.source_location.last
- line.should be_an_instance_of(Fixnum)
+ line.should be_an_instance_of(Integer)
line.should == 5
end
diff --git a/spec/ruby/core/module/attr_accessor_spec.rb b/spec/ruby/core/module/attr_accessor_spec.rb
index 290599e631..a5455e4f5c 100644
--- a/spec/ruby/core/module/attr_accessor_spec.rb
+++ b/spec/ruby/core/module/attr_accessor_spec.rb
@@ -85,17 +85,17 @@ describe "Module#attr_accessor" do
describe "on immediates" do
before :each do
- class Fixnum
+ class Integer
attr_accessor :foobar
end
end
after :each do
- if Fixnum.method_defined?(:foobar)
- Fixnum.send(:remove_method, :foobar)
+ if Integer.method_defined?(:foobar)
+ Integer.send(:remove_method, :foobar)
end
- if Fixnum.method_defined?(:foobar=)
- Fixnum.send(:remove_method, :foobar=)
+ if Integer.method_defined?(:foobar=)
+ Integer.send(:remove_method, :foobar=)
end
end
diff --git a/spec/ruby/core/module/constants_spec.rb b/spec/ruby/core/module/constants_spec.rb
index beb25c6eaa..fe95143872 100644
--- a/spec/ruby/core/module/constants_spec.rb
+++ b/spec/ruby/core/module/constants_spec.rb
@@ -13,9 +13,9 @@ describe "Module.constants" do
it "returns an array of Symbol names" do
# This in NOT an exhaustive list
- Module.constants.should include(:Array, :Bignum, :Class, :Comparable, :Dir,
+ Module.constants.should include(:Array, :Class, :Comparable, :Dir,
:Enumerable, :ENV, :Exception, :FalseClass,
- :File, :Fixnum, :Float, :Hash, :Integer, :IO,
+ :File, :Float, :Hash, :Integer, :IO,
:Kernel, :Math, :Method, :Module, :NilClass,
:Numeric, :Object, :Range, :Regexp, :String,
:Symbol, :Thread, :Time, :TrueClass)
diff --git a/spec/ruby/core/module/private_method_defined_spec.rb b/spec/ruby/core/module/private_method_defined_spec.rb
index 515542d9df..951f17aaa7 100644
--- a/spec/ruby/core/module/private_method_defined_spec.rb
+++ b/spec/ruby/core/module/private_method_defined_spec.rb
@@ -31,7 +31,7 @@ describe "Module#private_method_defined?" do
ModuleSpecs::CountsMixin.private_method_defined?(:private_3).should == true
end
- it "raises a TypeError if passed a Fixnum" do
+ it "raises a TypeError if passed an Integer" do
-> do
ModuleSpecs::CountsMixin.private_method_defined?(1)
end.should raise_error(TypeError)
diff --git a/spec/ruby/core/module/protected_method_defined_spec.rb b/spec/ruby/core/module/protected_method_defined_spec.rb
index 7be7bdd3c9..e022d7c5c4 100644
--- a/spec/ruby/core/module/protected_method_defined_spec.rb
+++ b/spec/ruby/core/module/protected_method_defined_spec.rb
@@ -31,7 +31,7 @@ describe "Module#protected_method_defined?" do
ModuleSpecs::CountsMixin.protected_method_defined?(:protected_3).should == true
end
- it "raises a TypeError if passed a Fixnum" do
+ it "raises a TypeError if passed an Integer" do
-> do
ModuleSpecs::CountsMixin.protected_method_defined?(1)
end.should raise_error(TypeError)
diff --git a/spec/ruby/core/module/public_method_defined_spec.rb b/spec/ruby/core/module/public_method_defined_spec.rb
index d2fcfd1e72..5c9bdf1ccc 100644
--- a/spec/ruby/core/module/public_method_defined_spec.rb
+++ b/spec/ruby/core/module/public_method_defined_spec.rb
@@ -31,7 +31,7 @@ describe "Module#public_method_defined?" do
ModuleSpecs::CountsMixin.public_method_defined?(:public_3).should == true
end
- it "raises a TypeError if passed a Fixnum" do
+ it "raises a TypeError if passed an Integer" do
-> do
ModuleSpecs::CountsMixin.public_method_defined?(1)
end.should raise_error(TypeError)
diff --git a/spec/ruby/core/nil/to_i_spec.rb b/spec/ruby/core/nil/to_i_spec.rb
index 099792ef68..d3d088e999 100644
--- a/spec/ruby/core/nil/to_i_spec.rb
+++ b/spec/ruby/core/nil/to_i_spec.rb
@@ -5,7 +5,7 @@ describe "NilClass#to_i" do
nil.to_i.should == 0
end
- it "does not cause NilClass to be coerced to Fixnum" do
+ it "does not cause NilClass to be coerced to Integer" do
(0 == nil).should == false
end
end
diff --git a/spec/ruby/core/numeric/denominator_spec.rb b/spec/ruby/core/numeric/denominator_spec.rb
index 34729446a2..d347b280f5 100644
--- a/spec/ruby/core/numeric/denominator_spec.rb
+++ b/spec/ruby/core/numeric/denominator_spec.rb
@@ -6,7 +6,7 @@ describe "Numeric#denominator" do
before :each do
@numbers = [
20, # Integer
- 99999999**99, # Bignum
+ 99999999**99, # Integer
]
end
diff --git a/spec/ruby/core/numeric/quo_spec.rb b/spec/ruby/core/numeric/quo_spec.rb
index 5c952b11a9..33b68a38f0 100644
--- a/spec/ruby/core/numeric/quo_spec.rb
+++ b/spec/ruby/core/numeric/quo_spec.rb
@@ -11,7 +11,7 @@ describe "Numeric#quo" do
2.quo(2.5).should eql(0.8)
end
- it "returns the result of self divided by the given Bignum as a Float" do
+ it "returns the result of self divided by the given Integer as a Float" do
45.quo(bignum_value).should be_close(1.04773789668636e-08, TOLERANCE)
end
diff --git a/spec/ruby/core/numeric/real_spec.rb b/spec/ruby/core/numeric/real_spec.rb
index 2d2499bcce..8702dcc7c2 100644
--- a/spec/ruby/core/numeric/real_spec.rb
+++ b/spec/ruby/core/numeric/real_spec.rb
@@ -7,7 +7,7 @@ describe "Numeric#real" do
20, # Integer
398.72, # Float
Rational(3, 4), # Rational
- bignum_value, # Bignum
+ bignum_value, # Integer
infinity_value,
nan_value
].map{ |n| [n, -n] }.flatten
diff --git a/spec/ruby/core/numeric/shared/imag.rb b/spec/ruby/core/numeric/shared/imag.rb
index ac2da40a3b..0b46b0020b 100644
--- a/spec/ruby/core/numeric/shared/imag.rb
+++ b/spec/ruby/core/numeric/shared/imag.rb
@@ -6,7 +6,7 @@ describe :numeric_imag, shared: true do
20, # Integer
398.72, # Float
Rational(3, 4), # Rational
- bignum_value, # Bignum
+ bignum_value, # Integer
infinity_value,
nan_value
].map{|n| [n,-n]}.flatten
diff --git a/spec/ruby/core/numeric/shared/rect.rb b/spec/ruby/core/numeric/shared/rect.rb
index 9cde19a398..c56f3c48ae 100644
--- a/spec/ruby/core/numeric/shared/rect.rb
+++ b/spec/ruby/core/numeric/shared/rect.rb
@@ -6,7 +6,7 @@ describe :numeric_rect, shared: true do
20, # Integer
398.72, # Float
Rational(3, 4), # Rational
- 99999999**99, # Bignum
+ 99999999**99, # Integer
infinity_value,
nan_value
]
diff --git a/spec/ruby/core/numeric/shared/step.rb b/spec/ruby/core/numeric/shared/step.rb
index 6c47cdeecb..72f33016d4 100644
--- a/spec/ruby/core/numeric/shared/step.rb
+++ b/spec/ruby/core/numeric/shared/step.rb
@@ -24,9 +24,9 @@ describe :numeric_step, :shared => true do
1.0.step.first(5).should == [1.0, 2.0, 3.0, 4.0, 5.0]
end
- describe "when self, stop and step are Fixnums" do
- it "yields only Fixnums" do
- @step.call(1, 5, 1) { |x| x.should be_an_instance_of(Fixnum) }
+ describe "when self, stop and step are Integers" do
+ it "yields only Integers" do
+ @step.call(1, 5, 1) { |x| x.should be_an_instance_of(Integer) }
end
describe "with a positive step" do
@@ -224,7 +224,7 @@ describe :numeric_step, :shared => true do
end
describe "when step is a String" do
- describe "with self and stop as Fixnums" do
+ describe "with self and stop as Integers" do
it "raises an ArgumentError when step is a numeric representation" do
-> { @step.call(1, 5, "1") {} }.should raise_error(ArgumentError)
-> { @step.call(1, 5, "0.1") {} }.should raise_error(ArgumentError)
@@ -280,7 +280,7 @@ describe :numeric_step, :shared => true do
end
describe "when step is a String" do
- describe "with self and stop as Fixnums" do
+ describe "with self and stop as Integers" do
it "returns an Enumerator" do
@step.call(1, 5, "foo").should be_an_instance_of(Enumerator)
end
@@ -296,7 +296,7 @@ describe :numeric_step, :shared => true do
describe "returned Enumerator" do
describe "size" do
describe "when step is a String" do
- describe "with self and stop as Fixnums" do
+ describe "with self and stop as Integers" do
it "raises an ArgumentError when step is a numeric representation" do
-> { @step.call(1, 5, "1").size }.should raise_error(ArgumentError)
-> { @step.call(1, 5, "0.1").size }.should raise_error(ArgumentError)
@@ -319,7 +319,7 @@ describe :numeric_step, :shared => true do
end
end
- describe "when self, stop and step are Fixnums and step is positive" do
+ describe "when self, stop and step are Integers and step is positive" do
it "returns the difference between self and stop divided by the number of steps" do
@step.call(5, 10, 11).size.should == 1
@step.call(5, 10, 6).size.should == 1
@@ -336,7 +336,7 @@ describe :numeric_step, :shared => true do
end
end
- describe "when self, stop and step are Fixnums and step is negative" do
+ describe "when self, stop and step are Integers and step is negative" do
it "returns the difference between self and stop divided by the number of steps" do
@step.call(10, 5, -11).size.should == 1
@step.call(10, 5, -6).size.should == 1
diff --git a/spec/ruby/core/objectspace/_id2ref_spec.rb b/spec/ruby/core/objectspace/_id2ref_spec.rb
index 1d8ad02deb..6e8828348e 100644
--- a/spec/ruby/core/objectspace/_id2ref_spec.rb
+++ b/spec/ruby/core/objectspace/_id2ref_spec.rb
@@ -7,7 +7,7 @@ describe "ObjectSpace._id2ref" do
r.should == s
end
- it "retrieves a Fixnum by object_id" do
+ it "retrieves an Integer by object_id" do
f = 1
r = ObjectSpace._id2ref(f.object_id)
r.should == f
diff --git a/spec/ruby/core/proc/hash_spec.rb b/spec/ruby/core/proc/hash_spec.rb
index d780c1ceb0..ebe0fde1a0 100644
--- a/spec/ruby/core/proc/hash_spec.rb
+++ b/spec/ruby/core/proc/hash_spec.rb
@@ -7,7 +7,7 @@ describe "Proc#hash" do
end
it "returns an Integer" do
- proc { 1 + 489 }.hash.should be_kind_of(Fixnum)
+ proc { 1 + 489 }.hash.should be_kind_of(Integer)
end
it "is stable" do
diff --git a/spec/ruby/core/proc/source_location_spec.rb b/spec/ruby/core/proc/source_location_spec.rb
index b5b8178df2..f268499b82 100644
--- a/spec/ruby/core/proc/source_location_spec.rb
+++ b/spec/ruby/core/proc/source_location_spec.rb
@@ -34,21 +34,21 @@ describe "Proc#source_location" do
file.should == File.realpath('../fixtures/source_location.rb', __FILE__)
end
- it "sets the last value to a Fixnum representing the line on which the proc was defined" do
+ it "sets the last value to an Integer representing the line on which the proc was defined" do
line = @proc.source_location.last
- line.should be_an_instance_of(Fixnum)
+ line.should be_an_instance_of(Integer)
line.should == 4
line = @proc_new.source_location.last
- line.should be_an_instance_of(Fixnum)
+ line.should be_an_instance_of(Integer)
line.should == 12
line = @lambda.source_location.last
- line.should be_an_instance_of(Fixnum)
+ line.should be_an_instance_of(Integer)
line.should == 8
line = @method.source_location.last
- line.should be_an_instance_of(Fixnum)
+ line.should be_an_instance_of(Integer)
line.should == 15
end
diff --git a/spec/ruby/core/process/euid_spec.rb b/spec/ruby/core/process/euid_spec.rb
index 7bbacfadfd..a2f1bbf42e 100644
--- a/spec/ruby/core/process/euid_spec.rb
+++ b/spec/ruby/core/process/euid_spec.rb
@@ -2,7 +2,7 @@ require_relative '../../spec_helper'
describe "Process.euid" do
it "returns the effective user ID for this process" do
- Process.euid.should be_kind_of(Fixnum)
+ Process.euid.should be_kind_of(Integer)
end
it "also goes by Process::UID.eid" do
diff --git a/spec/ruby/core/process/getpriority_spec.rb b/spec/ruby/core/process/getpriority_spec.rb
index 4b66e18679..a35e5956a5 100644
--- a/spec/ruby/core/process/getpriority_spec.rb
+++ b/spec/ruby/core/process/getpriority_spec.rb
@@ -5,19 +5,19 @@ describe "Process.getpriority" do
it "coerces arguments to Integers" do
ret = Process.getpriority mock_int(Process::PRIO_PROCESS), mock_int(0)
- ret.should be_kind_of(Fixnum)
+ ret.should be_kind_of(Integer)
end
it "gets the scheduling priority for a specified process" do
- Process.getpriority(Process::PRIO_PROCESS, 0).should be_kind_of(Fixnum)
+ Process.getpriority(Process::PRIO_PROCESS, 0).should be_kind_of(Integer)
end
it "gets the scheduling priority for a specified process group" do
- Process.getpriority(Process::PRIO_PGRP, 0).should be_kind_of(Fixnum)
+ Process.getpriority(Process::PRIO_PGRP, 0).should be_kind_of(Integer)
end
it "gets the scheduling priority for a specified user" do
- Process.getpriority(Process::PRIO_USER, 0).should be_kind_of(Fixnum)
+ Process.getpriority(Process::PRIO_USER, 0).should be_kind_of(Integer)
end
end
end
diff --git a/spec/ruby/core/process/kill_spec.rb b/spec/ruby/core/process/kill_spec.rb
index 4bd64a1fe8..af9c9e6deb 100644
--- a/spec/ruby/core/process/kill_spec.rb
+++ b/spec/ruby/core/process/kill_spec.rb
@@ -16,7 +16,7 @@ describe "Process.kill" do
-> { Process.kill("term", @pid) }.should raise_error(ArgumentError)
end
- it "raises an ArgumentError if signal is not a Fixnum or String" do
+ it "raises an ArgumentError if signal is not an Integer or String" do
signal = mock("process kill signal")
signal.should_not_receive(:to_int)
diff --git a/spec/ruby/core/process/maxgroups_spec.rb b/spec/ruby/core/process/maxgroups_spec.rb
index 362f788ab2..2549a7a971 100644
--- a/spec/ruby/core/process/maxgroups_spec.rb
+++ b/spec/ruby/core/process/maxgroups_spec.rb
@@ -3,7 +3,7 @@ require_relative '../../spec_helper'
platform_is_not :windows do
describe "Process.maxgroups" do
it "returns the maximum number of gids allowed in the supplemental group access list" do
- Process.maxgroups.should be_kind_of(Fixnum)
+ Process.maxgroups.should be_kind_of(Integer)
end
it "sets the maximum number of gids allowed in the supplemental group access list" do
diff --git a/spec/ruby/core/process/pid_spec.rb b/spec/ruby/core/process/pid_spec.rb
index c5947ab50d..2d008bc4b7 100644
--- a/spec/ruby/core/process/pid_spec.rb
+++ b/spec/ruby/core/process/pid_spec.rb
@@ -3,7 +3,7 @@ require_relative '../../spec_helper'
describe "Process.pid" do
it "returns the process id of this process" do
pid = Process.pid
- pid.should be_kind_of(Fixnum)
+ pid.should be_kind_of(Integer)
Process.pid.should == pid
end
end
diff --git a/spec/ruby/core/process/spawn_spec.rb b/spec/ruby/core/process/spawn_spec.rb
index 40509471ef..e373d8600c 100644
--- a/spec/ruby/core/process/spawn_spec.rb
+++ b/spec/ruby/core/process/spawn_spec.rb
@@ -48,10 +48,10 @@ describe "Process.spawn" do
-> { Process.wait Process.spawn("echo spawn") }.should output_to_fd("spawn\n")
end
- it "returns the process ID of the new process as a Fixnum" do
+ it "returns the process ID of the new process as an Integer" do
pid = Process.spawn(*ruby_exe, "-e", "exit")
Process.wait pid
- pid.should be_an_instance_of(Fixnum)
+ pid.should be_an_instance_of(Integer)
end
it "returns immediately" do
@@ -457,7 +457,7 @@ describe "Process.spawn" do
# redirection
- it "redirects STDOUT to the given file descriptor if out: Fixnum" do
+ it "redirects STDOUT to the given file descriptor if out: Integer" do
File.open(@name, 'w') do |file|
-> do
Process.wait Process.spawn("echo glark", out: file.fileno)
@@ -483,7 +483,7 @@ describe "Process.spawn" do
File.read(@name).should == "glark\n"
end
- it "redirects STDERR to the given file descriptor if err: Fixnum" do
+ it "redirects STDERR to the given file descriptor if err: Integer" do
File.open(@name, 'w') do |file|
-> do
Process.wait Process.spawn("echo glark>&2", err: file.fileno)
diff --git a/spec/ruby/core/random/new_seed_spec.rb b/spec/ruby/core/random/new_seed_spec.rb
index 4b34e871a2..7a93da99aa 100644
--- a/spec/ruby/core/random/new_seed_spec.rb
+++ b/spec/ruby/core/random/new_seed_spec.rb
@@ -1,8 +1,8 @@
require_relative '../../spec_helper'
describe "Random.new_seed" do
- it "returns a Bignum" do
- Random.new_seed.should be_an_instance_of(Bignum)
+ it "returns an Integer" do
+ Random.new_seed.should be_an_instance_of(Integer)
end
it "returns an arbitrary seed value each time" do
diff --git a/spec/ruby/core/random/new_spec.rb b/spec/ruby/core/random/new_spec.rb
index 07d7b439ca..4280b5b9c3 100644
--- a/spec/ruby/core/random/new_spec.rb
+++ b/spec/ruby/core/random/new_spec.rb
@@ -4,7 +4,7 @@ describe "Random.new" do
end
it "uses a random seed value if none is supplied" do
- Random.new.seed.should be_an_instance_of(Bignum)
+ Random.new.seed.should be_an_instance_of(Integer)
end
it "returns Random instances initialized with different seeds" do
diff --git a/spec/ruby/core/random/rand_spec.rb b/spec/ruby/core/random/rand_spec.rb
index 0e423301f8..7fd60d5553 100644
--- a/spec/ruby/core/random/rand_spec.rb
+++ b/spec/ruby/core/random/rand_spec.rb
@@ -49,18 +49,18 @@ describe "Random.rand" do
end
end
-describe "Random#rand with Fixnum" do
+describe "Random#rand with Integer" do
it "returns an Integer" do
- Random.new.rand(20).should be_an_instance_of(Fixnum)
+ Random.new.rand(20).should be_an_instance_of(Integer)
end
- it "returns a Fixnum greater than or equal to 0" do
+ it "returns an Integer greater than or equal to 0" do
prng = Random.new
ints = 20.times.map { prng.rand(5) }
ints.min.should >= 0
end
- it "returns a Fixnum less than the argument" do
+ it "returns an Integer less than the argument" do
prng = Random.new
ints = 20.times.map { prng.rand(5) }
ints.max.should <= 4
@@ -92,19 +92,19 @@ describe "Random#rand with Fixnum" do
end
end
-describe "Random#rand with Bignum" do
- it "typically returns a Bignum" do
+describe "Random#rand with Integer" do
+ it "typically returns an Integer" do
rnd = Random.new(1)
- 10.times.map{ rnd.rand(bignum_value*2) }.max.should be_an_instance_of(Bignum)
+ 10.times.map{ rnd.rand(bignum_value*2) }.max.should be_an_instance_of(Integer)
end
- it "returns a Bignum greater than or equal to 0" do
+ it "returns an Integer greater than or equal to 0" do
prng = Random.new
bigs = 20.times.map { prng.rand(bignum_value) }
bigs.min.should >= 0
end
- it "returns a Bignum less than the argument" do
+ it "returns an Integer less than the argument" do
prng = Random.new
bigs = 20.times.map { prng.rand(bignum_value) }
bigs.max.should < bignum_value
@@ -159,7 +159,7 @@ end
describe "Random#rand with Range" do
it "returns an element from the Range" do
- Random.new.rand(20..43).should be_an_instance_of(Fixnum)
+ Random.new.rand(20..43).should be_an_instance_of(Integer)
end
it "supports custom object types" do
diff --git a/spec/ruby/core/range/hash_spec.rb b/spec/ruby/core/range/hash_spec.rb
index 90aeee7890..4f2681e86e 100644
--- a/spec/ruby/core/range/hash_spec.rb
+++ b/spec/ruby/core/range/hash_spec.rb
@@ -14,11 +14,11 @@ describe "Range#hash" do
(0..10).hash.should_not == (0...10).hash
end
- it "generates a Fixnum for the hash value" do
- (0..0).hash.should be_an_instance_of(Fixnum)
- (0..1).hash.should be_an_instance_of(Fixnum)
- (0...10).hash.should be_an_instance_of(Fixnum)
- (0..10).hash.should be_an_instance_of(Fixnum)
+ it "generates an Integer for the hash value" do
+ (0..0).hash.should be_an_instance_of(Integer)
+ (0..1).hash.should be_an_instance_of(Integer)
+ (0...10).hash.should be_an_instance_of(Integer)
+ (0..10).hash.should be_an_instance_of(Integer)
end
end
diff --git a/spec/ruby/core/regexp/last_match_spec.rb b/spec/ruby/core/regexp/last_match_spec.rb
index ed496b7941..6bd8f2cd90 100644
--- a/spec/ruby/core/regexp/last_match_spec.rb
+++ b/spec/ruby/core/regexp/last_match_spec.rb
@@ -7,7 +7,7 @@ describe "Regexp.last_match" do
Regexp.last_match.should be_kind_of(MatchData)
end
- it "returns the nth field in this MatchData when passed a Fixnum" do
+ it "returns the nth field in this MatchData when passed an Integer" do
/c(.)t/ =~ 'cat'
Regexp.last_match(1).should == 'a'
end
diff --git a/spec/ruby/core/regexp/new_spec.rb b/spec/ruby/core/regexp/new_spec.rb
index d2d867b3d3..ce662b7a4f 100644
--- a/spec/ruby/core/regexp/new_spec.rb
+++ b/spec/ruby/core/regexp/new_spec.rb
@@ -14,7 +14,7 @@ describe "Regexp.new given a Regexp" do
it_behaves_like :regexp_new_string_binary, :compile
end
-describe "Regexp.new given a Fixnum" do
+describe "Regexp.new given an Integer" do
it "raises a TypeError" do
-> { Regexp.new(1) }.should raise_error(TypeError)
end
diff --git a/spec/ruby/core/regexp/options_spec.rb b/spec/ruby/core/regexp/options_spec.rb
index fb4853a014..527b51a3b2 100644
--- a/spec/ruby/core/regexp/options_spec.rb
+++ b/spec/ruby/core/regexp/options_spec.rb
@@ -1,10 +1,10 @@
require_relative '../../spec_helper'
describe "Regexp#options" do
- it "returns a Fixnum bitvector of regexp options for the Regexp object" do
- /cat/.options.should be_kind_of(Fixnum)
+ it "returns an Integer bitvector of regexp options for the Regexp object" do
+ /cat/.options.should be_kind_of(Integer)
not_supported_on :opal do
- /cat/ix.options.should be_kind_of(Fixnum)
+ /cat/ix.options.should be_kind_of(Integer)
end
end
diff --git a/spec/ruby/core/regexp/shared/new.rb b/spec/ruby/core/regexp/shared/new.rb
index bb5df7bc2e..9cbf89cd8b 100644
--- a/spec/ruby/core/regexp/shared/new.rb
+++ b/spec/ruby/core/regexp/shared/new.rb
@@ -58,7 +58,7 @@ describe :regexp_new_string, shared: true do
end
end
- it "sets options from second argument if it is one of the Fixnum option constants" do
+ it "sets options from second argument if it is one of the Integer option constants" do
r = Regexp.send(@method, 'Hi', Regexp::IGNORECASE)
(r.options & Regexp::IGNORECASE).should_not == 0
(r.options & Regexp::MULTILINE).should == 0
@@ -81,14 +81,14 @@ describe :regexp_new_string, shared: true do
end
end
- it "accepts a Fixnum of two or more options ORed together as the second argument" do
+ it "accepts an Integer of two or more options ORed together as the second argument" do
r = Regexp.send(@method, 'Hi', Regexp::IGNORECASE | Regexp::EXTENDED)
(r.options & Regexp::IGNORECASE).should_not == 0
(r.options & Regexp::MULTILINE).should == 0
(r.options & Regexp::EXTENDED).should_not == 0
end
- it "treats any non-Fixnum, non-nil, non-false second argument as IGNORECASE" do
+ it "treats any non-Integer, non-nil, non-false second argument as IGNORECASE" do
r = Regexp.send(@method, 'Hi', Object.new)
(r.options & Regexp::IGNORECASE).should_not == 0
(r.options & Regexp::MULTILINE).should == 0
diff --git a/spec/ruby/core/string/bytes_spec.rb b/spec/ruby/core/string/bytes_spec.rb
index 96f1ae9cf2..859b346550 100644
--- a/spec/ruby/core/string/bytes_spec.rb
+++ b/spec/ruby/core/string/bytes_spec.rb
@@ -22,9 +22,9 @@ describe "String#bytes" do
@utf8_ascii.bytes.to_a.size.should == @utf8_ascii.bytesize
end
- it "returns bytes as Fixnums" do
- @ascii.bytes.to_a.each {|b| b.should be_an_instance_of(Fixnum)}
- @utf8_ascii.bytes { |b| b.should be_an_instance_of(Fixnum) }
+ it "returns bytes as Integers" do
+ @ascii.bytes.to_a.each {|b| b.should be_an_instance_of(Integer)}
+ @utf8_ascii.bytes { |b| b.should be_an_instance_of(Integer) }
end
it "agrees with #unpack('C*')" do
diff --git a/spec/ruby/core/string/element_set_spec.rb b/spec/ruby/core/string/element_set_spec.rb
index 641d46bc91..c9e02a7381 100644
--- a/spec/ruby/core/string/element_set_spec.rb
+++ b/spec/ruby/core/string/element_set_spec.rb
@@ -5,7 +5,7 @@ require_relative 'fixtures/classes'
# TODO: Add missing String#[]= specs:
# String#[re, idx] = obj
-describe "String#[]= with Fixnum index" do
+describe "String#[]= with Integer index" do
it "replaces the char at idx with other_str" do
a = "hello"
a[0] = "bam"
@@ -85,7 +85,7 @@ describe "String#[]= with Fixnum index" do
-> { "test"[1] = nil }.should raise_error(TypeError)
end
- it "raises a TypeError if passed a Fixnum replacement" do
+ it "raises a TypeError if passed an Integer replacement" do
-> { "abc"[1] = 65 }.should raise_error(TypeError)
end
@@ -102,7 +102,7 @@ describe "String#[]= with Fixnum index" do
str.should == "あa"
end
- it "raises a TypeError if #to_int does not return an Fixnum" do
+ it "raises a TypeError if #to_int does not return an Integer" do
index = mock("string element set")
index.should_receive(:to_int).and_return('1')
@@ -243,7 +243,7 @@ describe "String#[]= with a Regexp index" do
str.should == "axc"
end
- it "raises a TypeError if #to_int does not return a Fixnum" do
+ it "raises a TypeError if #to_int does not return an Integer" do
ref = mock("string element set regexp ref")
ref.should_receive(:to_int).and_return(nil)
@@ -438,7 +438,7 @@ describe "String#[]= with a Range index" do
end
end
-describe "String#[]= with Fixnum index, count" do
+describe "String#[]= with Integer index, count" do
it "starts at idx and overwrites count characters before inserting the rest of other_str" do
a = "hello"
a[0, 2] = "xx"
diff --git a/spec/ruby/core/string/index_spec.rb b/spec/ruby/core/string/index_spec.rb
index ca62911db0..8d2c8af193 100644
--- a/spec/ruby/core/string/index_spec.rb
+++ b/spec/ruby/core/string/index_spec.rb
@@ -27,7 +27,7 @@ describe "String#index" do
"abc".index("c", offset).should == 2
end
- it "raises a TypeError if passed a Fixnum" do
+ it "raises a TypeError if passed an Integer" do
-> { "abc".index 97 }.should raise_error(TypeError)
end
end
diff --git a/spec/ruby/core/string/ord_spec.rb b/spec/ruby/core/string/ord_spec.rb
index 0f5a3f6a37..cfc630a124 100644
--- a/spec/ruby/core/string/ord_spec.rb
+++ b/spec/ruby/core/string/ord_spec.rb
@@ -1,8 +1,8 @@
require_relative '../../spec_helper'
describe "String#ord" do
- it "returns a Fixnum" do
- 'a'.ord.should be_an_instance_of(Fixnum)
+ it "returns an Integer" do
+ 'a'.ord.should be_an_instance_of(Integer)
end
it "returns the codepoint of the first character in the String" do
diff --git a/spec/ruby/core/string/rindex_spec.rb b/spec/ruby/core/string/rindex_spec.rb
index e021486bc2..7a6af0c9d0 100644
--- a/spec/ruby/core/string/rindex_spec.rb
+++ b/spec/ruby/core/string/rindex_spec.rb
@@ -4,7 +4,7 @@ require_relative 'fixtures/classes'
require_relative 'fixtures/utf-8-encoding'
describe "String#rindex with object" do
- it "raises a TypeError if obj isn't a String, Fixnum or Regexp" do
+ it "raises a TypeError if obj isn't a String, Integer or Regexp" do
not_supported_on :opal do
-> { "hello".rindex(:sym) }.should raise_error(TypeError)
end
diff --git a/spec/ruby/core/string/shared/codepoints.rb b/spec/ruby/core/string/shared/codepoints.rb
index e94a57f48e..0b2e078e0a 100644
--- a/spec/ruby/core/string/shared/codepoints.rb
+++ b/spec/ruby/core/string/shared/codepoints.rb
@@ -26,9 +26,9 @@ describe :string_codepoints, shared: true do
-> { s.send(@method) { } }.should raise_error(ArgumentError)
end
- it "yields codepoints as Fixnums" do
+ it "yields codepoints as Integers" do
"glark\u{20}".send(@method).to_a.each do |codepoint|
- codepoint.should be_an_instance_of(Fixnum)
+ codepoint.should be_an_instance_of(Integer)
end
end
diff --git a/spec/ruby/core/string/to_i_spec.rb b/spec/ruby/core/string/to_i_spec.rb
index a37be47778..e4fa89aab3 100644
--- a/spec/ruby/core/string/to_i_spec.rb
+++ b/spec/ruby/core/string/to_i_spec.rb
@@ -131,29 +131,29 @@ describe "String#to_i" do
-> { "".to_i(37) }.should raise_error(ArgumentError)
end
- it "returns a Fixnum for long strings with trailing spaces" do
+ it "returns an Integer for long strings with trailing spaces" do
"0 ".to_i.should == 0
- "0 ".to_i.should be_an_instance_of(Fixnum)
+ "0 ".to_i.should be_an_instance_of(Integer)
"10 ".to_i.should == 10
- "10 ".to_i.should be_an_instance_of(Fixnum)
+ "10 ".to_i.should be_an_instance_of(Integer)
"-10 ".to_i.should == -10
- "-10 ".to_i.should be_an_instance_of(Fixnum)
+ "-10 ".to_i.should be_an_instance_of(Integer)
end
- it "returns a Fixnum for long strings with leading spaces" do
+ it "returns an Integer for long strings with leading spaces" do
" 0".to_i.should == 0
- " 0".to_i.should be_an_instance_of(Fixnum)
+ " 0".to_i.should be_an_instance_of(Integer)
" 10".to_i.should == 10
- " 10".to_i.should be_an_instance_of(Fixnum)
+ " 10".to_i.should be_an_instance_of(Integer)
" -10".to_i.should == -10
- " -10".to_i.should be_an_instance_of(Fixnum)
+ " -10".to_i.should be_an_instance_of(Integer)
end
- it "returns the correct Bignum for long strings" do
+ it "returns the correct Integer for long strings" do
"245789127594125924165923648312749312749327482".to_i.should == 245789127594125924165923648312749312749327482
"-245789127594125924165923648312749312749327482".to_i.should == -245789127594125924165923648312749312749327482
end
diff --git a/spec/ruby/core/struct/hash_spec.rb b/spec/ruby/core/struct/hash_spec.rb
index 545929e402..d3c95fbe56 100644
--- a/spec/ruby/core/struct/hash_spec.rb
+++ b/spec/ruby/core/struct/hash_spec.rb
@@ -4,11 +4,11 @@ require_relative 'shared/accessor'
describe "Struct#hash" do
- it "returns the same fixnum for structs with the same content" do
+ it "returns the same integer for structs with the same content" do
[StructClasses::Ruby.new("1.8.6", "PPC"),
StructClasses::Car.new("Hugo", "Foo", "1972")].each do |stc|
stc.hash.should == stc.dup.hash
- stc.hash.should be_kind_of(Fixnum)
+ stc.hash.should be_kind_of(Integer)
end
end
diff --git a/spec/ruby/core/symbol/casecmp_spec.rb b/spec/ruby/core/symbol/casecmp_spec.rb
index b485101d63..80ea51e910 100644
--- a/spec/ruby/core/symbol/casecmp_spec.rb
+++ b/spec/ruby/core/symbol/casecmp_spec.rb
@@ -63,7 +63,7 @@ describe "Symbol#casecmp" do
:abc.casecmp("abc").should be_nil
end
- it "returns nil if other is a Fixnum" do
+ it "returns nil if other is an Integer" do
:abc.casecmp(1).should be_nil
end
diff --git a/spec/ruby/core/symbol/comparison_spec.rb b/spec/ruby/core/symbol/comparison_spec.rb
index 173a7da625..613177be05 100644
--- a/spec/ruby/core/symbol/comparison_spec.rb
+++ b/spec/ruby/core/symbol/comparison_spec.rb
@@ -40,7 +40,7 @@ describe "Symbol#<=>" do
(:abc <=> "abc").should be_nil
end
- it "returns nil if other is a Fixnum" do
+ it "returns nil if other is an Integer" do
(:abc <=> 1).should be_nil
end
diff --git a/spec/ruby/core/time/hash_spec.rb b/spec/ruby/core/time/hash_spec.rb
index 577aaf9b0a..4f4d11a2cd 100644
--- a/spec/ruby/core/time/hash_spec.rb
+++ b/spec/ruby/core/time/hash_spec.rb
@@ -1,8 +1,8 @@
require_relative '../../spec_helper'
describe "Time#hash" do
- it "returns a Fixnum" do
- Time.at(100).hash.should be_an_instance_of(Fixnum)
+ it "returns an Integer" do
+ Time.at(100).hash.should be_an_instance_of(Integer)
end
it "is stable" do
diff --git a/spec/ruby/core/time/subsec_spec.rb b/spec/ruby/core/time/subsec_spec.rb
index 583a26412b..0f2c4eb856 100644
--- a/spec/ruby/core/time/subsec_spec.rb
+++ b/spec/ruby/core/time/subsec_spec.rb
@@ -1,7 +1,7 @@
require_relative '../../spec_helper'
describe "Time#subsec" do
- it "returns 0 as a Fixnum for a Time with a whole number of seconds" do
+ it "returns 0 as an Integer for a Time with a whole number of seconds" do
Time.at(100).subsec.should eql(0)
end
diff --git a/spec/ruby/core/unboundmethod/source_location_spec.rb b/spec/ruby/core/unboundmethod/source_location_spec.rb
index b5e6413816..96933a5d40 100644
--- a/spec/ruby/core/unboundmethod/source_location_spec.rb
+++ b/spec/ruby/core/unboundmethod/source_location_spec.rb
@@ -12,9 +12,9 @@ describe "UnboundMethod#source_location" do
file.should == File.realpath('../fixtures/classes.rb', __FILE__)
end
- it "sets the last value to a Fixnum representing the line on which the method was defined" do
+ it "sets the last value to an Integer representing the line on which the method was defined" do
line = @method.source_location.last
- line.should be_an_instance_of(Fixnum)
+ line.should be_an_instance_of(Integer)
line.should == 5
end