From 862041d0546df6618e19a32051661ff39a7ffcb2 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 18 Jul 2024 10:27:25 +0900 Subject: [ruby/uri] Rename and switch RFC2396_PARSER test https://github.com/ruby/uri/commit/2e0f73f05e --- test/uri/test_parser.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/uri/test_parser.rb b/test/uri/test_parser.rb index f400de20a8..9105d47f7b 100644 --- a/test/uri/test_parser.rb +++ b/test/uri/test_parser.rb @@ -33,7 +33,9 @@ class URI::TestParser < Test::Unit::TestCase assert(!u2.equal?(u3)) end - def test_parse + def test_parse_rfc2396_parser + URI.parser = URI::RFC2396_PARSER + escaped = URI::REGEXP::PATTERN::ESCAPED hex = URI::REGEXP::PATTERN::HEX p1 = URI::Parser.new(:ESCAPED => "(?:#{escaped}|%u[#{hex}]{4})") @@ -43,6 +45,8 @@ class URI::TestParser < Test::Unit::TestCase u1.path = '/%uDCBA' assert_equal(['http', nil, 'a', URI::HTTP.default_port, '/%uDCBA', nil, nil], uri_to_ary(u1)) + ensure + URI.parser = URI::DEFAULT_PARSER end def test_parse_query_pct_encoded -- cgit v1.2.3