mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 07:26:00 +02:00
Revert "Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)"
This reverts commit 2a22a6b2d8
.
Revert [Feature #13083]
This commit is contained in:
parent
08074eb712
commit
8852fa8760
5 changed files with 15 additions and 41 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue