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:
naruse 2014-06-27 06:25:44 +00:00
parent b0bc563550
commit 36a043a93a

View file

@ -33,6 +33,7 @@ class TestCommon < Test::Unit::TestCase
end end
def test_regexp def test_regexp
EnvUtil.suppress_warning do
assert_instance_of Regexp, URI.regexp assert_instance_of Regexp, URI.regexp
assert_instance_of Regexp, URI.regexp(['http']) assert_instance_of Regexp, URI.regexp(['http'])
assert_equal URI.regexp, URI.regexp assert_equal URI.regexp, URI.regexp
@ -45,6 +46,7 @@ class TestCommon < Test::Unit::TestCase
assert_equal nil, ':'.slice(URI.regexp) assert_equal nil, ':'.slice(URI.regexp)
assert_equal 'From:', 'From:'.slice(URI.regexp) assert_equal 'From:', 'From:'.slice(URI.regexp)
end end
end
def test_kernel_uri def test_kernel_uri
expected = URI.parse("http://www.ruby-lang.org/") expected = URI.parse("http://www.ruby-lang.org/")