diff options
author | NARUSE, Yui <naruse@airemix.jp> | 2019-12-04 01:26:24 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2019-12-04 06:40:54 +0900 |
commit | 34a66b1f36e9a065cf8433598b3fce03ce2c711e (patch) | |
tree | 04956cfd1debbc9421e109cbff9f764f51af479c /spec/ruby/core | |
parent | a029b54ec716812ade37fef1f857c49f821a8cc8 (diff) | |
download | ruby-34a66b1f36e9a065cf8433598b3fce03ce2c711e.tar.gz |
Revert "Fix warnings in Regexp#{match,match?} specs"
This reverts commit 782d1b8fb0a039cedef9ad9c94f432dad51901e6.
Diffstat (limited to 'spec/ruby/core')
-rw-r--r-- | spec/ruby/core/regexp/match_spec.rb | 16 |
1 files 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 |