Getting this error on latest master when a top-level Parser constant is defined before URI is loaded:
$ ruby -Ilib -e 'module Parser; end; require "uri/common"'
/Users/rwstauner/src/github.com/ruby/uri/lib/uri/common.rb:26:in `remove_const': constant URI::Parser not defined (NameError)
remove_const(:Parser) if defined?(Parser)
^^^^^^^^^^^^
from /Users/rwstauner/src/github.com/ruby/uri/lib/uri/common.rb:26:in `parser='
from /Users/rwstauner/src/github.com/ruby/uri/lib/uri/common.rb:46:in `<module:URI>'
from /Users/rwstauner/src/github.com/ruby/uri/lib/uri/common.rb:15:in `<top (required)>'
from <internal:/Users/rwstauner/.rubies/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
from <internal:/Users/rwstauner/.rubies/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
from -e:1:in `<main>'
Getting this error on latest master when a top-level Parser constant is defined before URI is loaded: