summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKenichi Kamiya <kachick1@gmail.com>2019-11-03 09:24:55 +0900
committerBenoit Daloze <eregontp@gmail.com>2019-11-03 11:03:04 +0100
commit31110d820cc1258cbc84b46ecc65b254c7d5529a (patch)
tree4701ca0fa6ea70de062c2c0caf809b115925977f /spec
parent452bee3ee8d68059fabd9b1c7a75661b14e3933e (diff)
Improve warning message
https://github.com/ruby/ruby/pull/2637#discussion_r341812475
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/core/regexp/match_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/regexp/match_spec.rb b/spec/ruby/core/regexp/match_spec.rb
index 8297be1c1d..e2075d1dc0 100644
--- a/spec/ruby/core/regexp/match_spec.rb
+++ b/spec/ruby/core/regexp/match_spec.rb
@@ -100,7 +100,7 @@ describe "Regexp#match" do
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/)
+ -> { /foo/.match(nil) }.should complain(/given argument is nil; this will raise a TypeError in the next release/)
end
end
@@ -151,7 +151,7 @@ describe "Regexp#match?" do
ruby_version_is "2.7"..."3.0" do
it "warns the deprecation" do
- -> { /./.match?(nil) }.should complain(/given argument is nil/)
+ -> { /./.match?(nil) }.should complain(/given argument is nil; this will raise a TypeError in the next release/)
end
end