We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I've got the error "warning: character class has duplicated range"
I found that Addressable::URI::CharacterClasses::AUTHORITY has redundant colon:
PCHAR = UNRESERVED + SUB_DELIMS + "\\:\\@" ... AUTHORITY = PCHAR + "\\[\\:\\]"
See
addressable/lib/addressable/uri.rb
Line 51 in f3fb80c
Ruby 3.0.2 give this warning.
The text was updated successfully, but these errors were encountered:
How to reproduce:
$ ruby -w -raddressable/uri -e 'Addressable::URI.encode_component("foo/bar", Addressable::URI::CharacterClasses::AUTHORITY)' /Users/dentarg/.gem/ruby/3.0.2/gems/addressable-2.8.0/lib/addressable/uri.rb:412: warning: character class has duplicated range: /[^a-zA-Z0-9\-\.\_\~\!\$\&\'\(\)\*\+\,\;\=\:\@\[\:\]]/ # or $ irb -w -r addressable/uri irb(main):001:0> Addressable::VERSION::STRING => "2.8.0" irb(main):002:0> Regexp.compile("[#{Addressable::URI::CharacterClasses::AUTHORITY}]") (irb):2: warning: character class has duplicated range: /[a-zA-Z0-9\-\.\_\~\!\$\&\'\(\)\*\+\,\;\=\:\@\[\:\]]/ => /[a-zA-Z0-9\-\.\_\~\!\$\&\'\(\)\*\+\,\;\=\:\@\[\:\]]/
Sorry, something went wrong.
Solved by #438
No branches or pull requests
I've got the error
"warning: character class has duplicated range"
I found that Addressable::URI::CharacterClasses::AUTHORITY has redundant colon:
See
addressable/lib/addressable/uri.rb
Line 51 in f3fb80c
Ruby 3.0.2 give this warning.
The text was updated successfully, but these errors were encountered: