mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
suppress warnings: URI.regexp is obsolete
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b0bc563550
commit
36a043a93a
1 changed files with 13 additions and 11 deletions
|
@ -33,6 +33,7 @@ class TestCommon < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_regexp
|
||||
EnvUtil.suppress_warning do
|
||||
assert_instance_of Regexp, URI.regexp
|
||||
assert_instance_of Regexp, URI.regexp(['http'])
|
||||
assert_equal URI.regexp, URI.regexp
|
||||
|
@ -45,6 +46,7 @@ class TestCommon < Test::Unit::TestCase
|
|||
assert_equal nil, ':'.slice(URI.regexp)
|
||||
assert_equal 'From:', 'From:'.slice(URI.regexp)
|
||||
end
|
||||
end
|
||||
|
||||
def test_kernel_uri
|
||||
expected = URI.parse("http://www.ruby-lang.org/")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue