summaryrefslogtreecommitdiff
path: root/spec/ruby/core/basicobject
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-21 01:16:26 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-21 01:19:55 +0900
commit9c73c756244fa27ffa99d81dcc73a4ad14198002 (patch)
tree14b0ea9059b8c31e276531a1df712ead4e158cdb /spec/ruby/core/basicobject
parentfb8f011422c645ebe29e94c3fb2079af73d1d35f (diff)
Use Integer instead of Fixnum/Bignum
Diffstat (limited to 'spec/ruby/core/basicobject')
-rw-r--r--spec/ruby/core/basicobject/instance_eval_spec.rb8
-rw-r--r--spec/ruby/core/basicobject/instance_exec_spec.rb8
2 files changed, 8 insertions, 8 deletions
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