From 16d98dc3c14675295ecb0945d0464c02a66453a7 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 26 Nov 2024 19:02:53 +0900 Subject: [PATCH] [ruby/uri] Suppress deprecate warning of test class (retry) (https://github.com/ruby/uri/pull/140) A follow-up to https://github.com/ruby/uri/commit/bd2e4be9d0fa Also, leave a comment that the use of `URI::REGEXP` is intentional https://github.com/ruby/uri/commit/bdf765e44a --- 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 1e28347012..6326aec561 100644 --- a/test/uri/test_common.rb +++ b/test/uri/test_common.rb @@ -12,10 +12,13 @@ class URI::TestCommon < Test::Unit::TestCase 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]