From c4436e339c4d167c12d93662b953ac6a459adff3 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 26 Nov 2024 18:33:01 +0900 Subject: [PATCH] Suppress deprecate warning of test class (retry) A follow-up to bd2e4be9d0fa4937efa7811a999f5820ea868a9f Also, leave a comment that the use of `URI::REGEXP` is intentional --- test/uri/test_common.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/uri/test_common.rb b/test/uri/test_common.rb index 1e28347..6326aec 100644 --- a/test/uri/test_common.rb +++ b/test/uri/test_common.rb @@ -12,10 +12,13 @@ def teardown EnvUtil.suppress_warning do class Foo + # Intentionally use `URI::REGEXP`, which is for the compatibility include URI::REGEXP::PATTERN end + end - def test_fallback_constants + def test_fallback_constants + EnvUtil.suppress_warning do assert_raise(NameError) { URI::FOO } assert_equal URI::ABS_URI, URI::RFC2396_PARSER.regexp[:ABS_URI]