diff options
Diffstat (limited to 'spec/ruby/core/regexp')
-rw-r--r-- | spec/ruby/core/regexp/last_match_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/regexp/new_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/regexp/options_spec.rb | 6 | ||||
-rw-r--r-- | spec/ruby/core/regexp/shared/new.rb | 6 |
4 files changed, 8 insertions, 8 deletions
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 |