From 34a66b1f36e9a065cf8433598b3fce03ce2c711e Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Wed, 4 Dec 2019 01:26:24 +0900 Subject: Revert "Fix warnings in Regexp#{match,match?} specs" This reverts commit 782d1b8fb0a039cedef9ad9c94f432dad51901e6. --- spec/ruby/core/regexp/match_spec.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/spec/ruby/core/regexp/match_spec.rb b/spec/ruby/core/regexp/match_spec.rb index f31b893f5e..81d7c32898 100644 --- a/spec/ruby/core/regexp/match_spec.rb +++ b/spec/ruby/core/regexp/match_spec.rb @@ -93,14 +93,12 @@ describe "Regexp#match" do ruby_version_is ""..."3.0" do it "resets $~ if passed nil" do - suppress_warning do - # set $~ - /./.match("a") - $~.should be_kind_of(MatchData) + # set $~ + /./.match("a") + $~.should be_kind_of(MatchData) - /1/.match(nil) - $~.should be_nil - end + /1/.match(nil) + $~.should be_nil end end @@ -151,9 +149,7 @@ describe "Regexp#match?" do ruby_version_is ""..."3.0" do it "returns false when given nil" do - suppress_warning do - /./.match?(nil).should be_false - end + /./.match?(nil).should be_false end end -- cgit v1.2.3