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

Skip to content

Conversation

rwstauner
Copy link
Contributor

@rwstauner rwstauner commented Jul 19, 2024

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/ruby/lib/uri/common.rb:26:in 'Module#remove_const': constant URI::Parser not defined (NameError)

    remove_const(:Parser) if defined?(Parser)
    ^^^^^^^^^^^^
        from /Users/rwstauner/src/github.com/ruby/ruby/lib/uri/common.rb:26:in 'URI.parser='

upstream PR ruby/uri#108

@hsbt

@rwstauner rwstauner force-pushed the uri-common-parser branch from d9e4492 to f228466 Compare July 20, 2024 05:39
@rwstauner rwstauner changed the title Restrict Parser check to current namespace to avoid conflict with ::Parser Restrict const checks to current namespace to avoid conflicts with globals Jul 20, 2024
@rwstauner
Copy link
Contributor Author

rwstauner commented Jul 21, 2024

synced from ruby/uri as da49bee

@rwstauner rwstauner closed this Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant