aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/regexp/match_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/regexp/match_spec.rb')
-rw-r--r--spec/ruby/core/regexp/match_spec.rb20
1 files changed, 4 insertions, 16 deletions
diff --git a/spec/ruby/core/regexp/match_spec.rb b/spec/ruby/core/regexp/match_spec.rb
index f796febc86..89cb3be4f6 100644
--- a/spec/ruby/core/regexp/match_spec.rb
+++ b/spec/ruby/core/regexp/match_spec.rb
@@ -91,7 +91,7 @@ describe "Regexp#match" do
end
end
- ruby_version_is ""..."3.0" do
+ ruby_version_is ""..."2.7" do
it "resets $~ if passed nil" do
# set $~
/./.match("a")
@@ -102,13 +102,7 @@ describe "Regexp#match" do
end
end
- ruby_version_is "2.7"..."3.0" do
- it "warns the deprecation when the given argument is nil" do
- -> { /foo/.match(nil) }.should complain(/given argument is nil/)
- end
- end
-
- ruby_version_is "3.0" do
+ ruby_version_is "2.7" do
it "raises TypeError when the given argument is nil" do
-> { /foo/.match(nil) }.should raise_error(TypeError)
end
@@ -147,19 +141,13 @@ describe "Regexp#match?" do
/str/i.match?('string', 1).should be_false
end
- ruby_version_is ""..."3.0" do
+ ruby_version_is ""..."2.7" do
it "returns false when given nil" do
/./.match?(nil).should be_false
end
end
- ruby_version_is "2.7"..."3.0" do
- it "warns the deprecation" do
- -> { /./.match?(nil) }.should complain(/given argument is nil/)
- end
- end
-
- ruby_version_is "3.0" do
+ ruby_version_is "2.7" do
it "raises TypeError when given nil" do
-> { /./.match?(nil) }.should raise_error(TypeError)
end