Revert "Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)"

This reverts commit 2a22a6b2d8.
Revert [Feature #13083]
This commit is contained in:
NARUSE, Yui 2019-12-04 01:26:29 +09:00
parent 08074eb712
commit 8852fa8760
5 changed files with 15 additions and 41 deletions

View file

@ -2469,7 +2469,6 @@ CODE
def test_match_method
assert_equal("bar", "foobarbaz".match(/bar/).to_s)
assert_raise(TypeError) { "".match(nil) }
o = Regexp.new('foo')
def o.match(x, y, z); x + y + z; end
@ -2525,10 +2524,6 @@ CODE
assert_equal('backref', $&)
end
def test_match_p_nil
assert_raise(TypeError) { ''.match?(nil) }
end
def test_clear
s = "foo" * 100
s.clear