mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_regexp.rb, test_string.rb: use assert_separately
* test/ruby/test_regexp.rb (test_eq_tilde_can_be_overridden): use assert_separately to suppress a warning. * test/ruby/test_string.rb (test_eq_tilde_can_be_overridden): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fa4c213397
commit
d4ef0b4794
2 changed files with 4 additions and 4 deletions
|
@ -1012,7 +1012,7 @@ class TestRegexp < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_eq_tilde_can_be_overridden
|
||||
assert_in_out_err([], <<-RUBY, ["foo"], [])
|
||||
assert_separately([], <<-RUBY)
|
||||
class Regexp
|
||||
undef =~
|
||||
def =~(str)
|
||||
|
@ -1020,7 +1020,7 @@ class TestRegexp < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
puts // =~ ""
|
||||
assert_equal("foo", // =~ "")
|
||||
RUBY
|
||||
end
|
||||
|
||||
|
|
|
@ -2258,7 +2258,7 @@ class TestString < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_eq_tilde_can_be_overridden
|
||||
assert_in_out_err([], <<-RUBY, ["foo"], [])
|
||||
assert_separately([], <<-RUBY)
|
||||
class String
|
||||
undef =~
|
||||
def =~(str)
|
||||
|
@ -2266,7 +2266,7 @@ class TestString < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
puts "" =~ //
|
||||
assert_equal("foo", "" =~ //)
|
||||
RUBY
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue