From a1b4816759418ca8fe510e8739622fc5d77ab0f0 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sat, 27 Apr 2019 18:53:23 +0200 Subject: Update to ruby/spec@15c9619 --- spec/ruby/core/regexp/match_spec.rb | 40 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'spec/ruby/core/regexp/match_spec.rb') diff --git a/spec/ruby/core/regexp/match_spec.rb b/spec/ruby/core/regexp/match_spec.rb index edac0d1d42..45ed4a5932 100644 --- a/spec/ruby/core/regexp/match_spec.rb +++ b/spec/ruby/core/regexp/match_spec.rb @@ -111,32 +111,30 @@ describe "Regexp#match" do end end -ruby_version_is "2.4" do - describe "Regexp#match?" do - before :each do - # Resetting Regexp.last_match - /DONTMATCH/.match '' - end +describe "Regexp#match?" do + before :each do + # Resetting Regexp.last_match + /DONTMATCH/.match '' + end - context "when matches the given value" do - it "returns true but does not set Regexp.last_match" do - /string/i.match?('string').should be_true - Regexp.last_match.should be_nil - end + context "when matches the given value" do + it "returns true but does not set Regexp.last_match" do + /string/i.match?('string').should be_true + Regexp.last_match.should be_nil end + end - it "returns false when does not match the given value" do - /STRING/.match?('string').should be_false - end + it "returns false when does not match the given value" do + /STRING/.match?('string').should be_false + end - it "takes matching position as the 2nd argument" do - /str/i.match?('string', 0).should be_true - /str/i.match?('string', 1).should be_false - end + it "takes matching position as the 2nd argument" do + /str/i.match?('string', 0).should be_true + /str/i.match?('string', 1).should be_false + end - it "returns false when given nil" do - /./.match?(nil).should be_false - end + it "returns false when given nil" do + /./.match?(nil).should be_false end end -- cgit v1.2.3