Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bdf765e

Browse files
authored
Suppress deprecate warning of test class (retry) (#140)
A follow-up to bd2e4be Also, leave a comment that the use of `URI::REGEXP` is intentional
1 parent 943d938 commit bdf765e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/uri/test_common.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ def teardown
1212

1313
EnvUtil.suppress_warning do
1414
class Foo
15+
# Intentionally use `URI::REGEXP`, which is for the compatibility
1516
include URI::REGEXP::PATTERN
1617
end
18+
end
1719

18-
def test_fallback_constants
20+
def test_fallback_constants
21+
EnvUtil.suppress_warning do
1922
assert_raise(NameError) { URI::FOO }
2023

2124
assert_equal URI::ABS_URI, URI::RFC2396_PARSER.regexp[:ABS_URI]

0 commit comments

Comments
 (0)