diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-12-21 01:16:26 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-12-21 01:19:55 +0900 |
commit | 9c73c756244fa27ffa99d81dcc73a4ad14198002 (patch) | |
tree | 14b0ea9059b8c31e276531a1df712ead4e158cdb /spec/ruby/language | |
parent | fb8f011422c645ebe29e94c3fb2079af73d1d35f (diff) | |
download | ruby-9c73c756244fa27ffa99d81dcc73a4ad14198002.tar.gz |
Use Integer instead of Fixnum/Bignum
Diffstat (limited to 'spec/ruby/language')
-rw-r--r-- | spec/ruby/language/README | 2 | ||||
-rw-r--r-- | spec/ruby/language/alias_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/language/defined_spec.rb | 4 | ||||
-rw-r--r-- | spec/ruby/language/module_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/language/predefined_spec.rb | 8 | ||||
-rw-r--r-- | spec/ruby/language/singleton_class_spec.rb | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/spec/ruby/language/README b/spec/ruby/language/README index 74eaf58709..ae08e17fb1 100644 --- a/spec/ruby/language/README +++ b/spec/ruby/language/README @@ -4,7 +4,7 @@ words. These words significantly describe major elements of the language, including flow control constructs like 'for' and 'while', conditional execution like 'if' and 'unless', exceptional execution control like 'rescue', etc. There are also literals for the basic "types" like String, Regexp, Array -and Fixnum. +and Integer. Behavioral specifications describe the behavior of concrete entities. Rather than using concepts of computation to organize these spec files, we use diff --git a/spec/ruby/language/alias_spec.rb b/spec/ruby/language/alias_spec.rb index 13f5c49513..d1d06e3fac 100644 --- a/spec/ruby/language/alias_spec.rb +++ b/spec/ruby/language/alias_spec.rb @@ -218,7 +218,7 @@ describe "The alias keyword" do subclass.new.test("testing").should == 4 end - it "is not allowed against Fixnum or String instances" do + it "is not allowed against Integer or String instances" do -> do 1.instance_eval do alias :foo :to_s diff --git a/spec/ruby/language/defined_spec.rb b/spec/ruby/language/defined_spec.rb index f2da8a9293..4fcf869f91 100644 --- a/spec/ruby/language/defined_spec.rb +++ b/spec/ruby/language/defined_spec.rb @@ -435,11 +435,11 @@ describe "The defined? keyword for an expression" do end end - it "returns 'expression' when passed a Fixnum literal" do + it "returns 'expression' when passed an Integer literal" do defined?(42).should == "expression" end - it "returns 'expression' when passed a Bignum literal" do + it "returns 'expression' when passed an Integer literal" do defined?(0xdead_beef_deed_feed).should == "expression" end diff --git a/spec/ruby/language/module_spec.rb b/spec/ruby/language/module_spec.rb index cbc7149359..1a5fcaf46f 100644 --- a/spec/ruby/language/module_spec.rb +++ b/spec/ruby/language/module_spec.rb @@ -43,7 +43,7 @@ describe "The module keyword" do -> { module ModuleSpecs::Modules::A; end }.should raise_error(TypeError) end - it "raises a TypeError if the constant is a Fixnum" do + it "raises a TypeError if the constant is an Integer" do -> { module ModuleSpecs::Modules::B; end }.should raise_error(TypeError) end diff --git a/spec/ruby/language/predefined_spec.rb b/spec/ruby/language/predefined_spec.rb index 65fcb1e2ac..b1f5d80ad4 100644 --- a/spec/ruby/language/predefined_spec.rb +++ b/spec/ruby/language/predefined_spec.rb @@ -518,7 +518,7 @@ $\ String The string appended to the output of every call Kernel#print and IO#write. The default value is nil. $, String The separator string output between the parameters to methods such as Kernel#print and Array#join. Defaults to nil, which adds no text. -$. Fixnum The number of the last line read from the current input file. +$. Integer The number of the last line read from the current input file. $; String The default separator pattern used by String#split. May be set from the command line using the -F flag. $< Object An object that provides access to the concatenation of the contents of all @@ -583,7 +583,7 @@ describe "Predefined global $/" do -> { $/ = obj }.should raise_error(TypeError) end - it "raises a TypeError if assigned a Fixnum" do + it "raises a TypeError if assigned an Integer" do -> { $/ = 1 }.should raise_error(TypeError) end @@ -632,7 +632,7 @@ describe "Predefined global $-0" do -> { $-0 = obj }.should raise_error(TypeError) end - it "raises a TypeError if assigned a Fixnum" do + it "raises a TypeError if assigned an Integer" do -> { $-0 = 1 }.should raise_error(TypeError) end @@ -781,7 +781,7 @@ $* Array An array of strings containing the command-line tion of the program. Options used by the Ruby interpreter will have been removed. [r/o] $" Array An array containing the filenames of modules loaded by require. [r/o] -$$ Fixnum The process number of the program being executed. [r/o] +$$ Integer The process number of the program being executed. [r/o] $? Process::Status The exit status of the last child process to terminate. [r/o, thread] $: Array An array of strings, where each string specifies a directory to be searched for Ruby scripts and binary extensions used by the load and require methods. diff --git a/spec/ruby/language/singleton_class_spec.rb b/spec/ruby/language/singleton_class_spec.rb index 705d9f3548..91ce9726d5 100644 --- a/spec/ruby/language/singleton_class_spec.rb +++ b/spec/ruby/language/singleton_class_spec.rb @@ -14,7 +14,7 @@ describe "A singleton class" do nil.singleton_class.should == NilClass end - it "raises a TypeError for Fixnum's" do + it "raises a TypeError for Integer's" do -> { 1.singleton_class }.should raise_error(TypeError) end @@ -74,7 +74,7 @@ describe "A singleton class" do end it "doesn't have singleton class" do - -> { bignum_value.singleton_class.superclass.should == Bignum }.should raise_error(TypeError) + -> { bignum_value.singleton_class.superclass.should == Integer }.should raise_error(TypeError) end end |