[ruby/uri] Suppress deprecate warning of test class and use EnvUtil.suppress_warning.

https://github.com/ruby/uri/commit/bd2e4be9d0
This commit is contained in:
Hiroshi SHIBATA 2024-11-26 10:47:12 +09:00 committed by git
parent 1d9dc4c504
commit 8655b9f7c6

View File

@ -10,14 +10,12 @@ class URI::TestCommon < Test::Unit::TestCase
def teardown
end
EnvUtil.suppress_warning do
class Foo
include URI::REGEXP::PATTERN
end
def test_fallback_constants
orig_verbose = $VERBOSE
$VERBOSE = nil
assert_raise(NameError) { URI::FOO }
assert_equal URI::ABS_URI, URI::RFC2396_PARSER.regexp[:ABS_URI]
@ -25,8 +23,7 @@ class URI::TestCommon < Test::Unit::TestCase
assert_equal URI::REGEXP, URI::RFC2396_REGEXP
assert_equal URI::REGEXP::PATTERN, URI::RFC2396_REGEXP::PATTERN
assert_equal Foo::IPV4ADDR, URI::RFC2396_REGEXP::PATTERN::IPV4ADDR
ensure
$VERBOSE = orig_verbose
end
end
def test_parser_switch