Skip to content

Commit

Permalink
Revert "Fix warnings in Regexp#{match,match?} specs"
Browse files Browse the repository at this point in the history
This reverts commit 782d1b8.
  • Loading branch information
nurse committed Dec 3, 2019
1 parent a029b54 commit 34a66b1
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions spec/ruby/core/regexp/match_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,12 @@

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

Expand Down Expand Up @@ -151,9 +149,7 @@

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

Expand Down

0 comments on commit 34a66b1

Please sign in to comment.