Skip to content
New issue

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

Remove redundant colon in Addressable::URI::CharacterClasses::AUTHORITY #438

Merged
merged 2 commits into from
Jan 15, 2022
Merged

Remove redundant colon in Addressable::URI::CharacterClasses::AUTHORITY #438

merged 2 commits into from
Jan 15, 2022

Conversation

ukolovda
Copy link
Contributor

@ukolovda ukolovda commented Oct 8, 2021

Addressed to #437

@ukolovda
Copy link
Contributor Author

ukolovda commented Oct 9, 2021

CI test failed on Ruby Devel:
/home/runner/work/addressable/addressable/lib/addressable/idna/native.rb:34: [BUG] Segmentation fault at 0x0000000000000000

It seems internal error in an unstable Ruby.

@masterofmasters13
Copy link

debug all ci or authority

@ukolovda
Copy link
Contributor Author

ukolovda commented Oct 31, 2021

Bug found in the used idn-ruby gem under ruby-head, see deepfryed/idn-ruby#9
CI Workflow failed on unchanged main branch also.

@ukolovda
Copy link
Contributor Author

ukolovda commented Nov 2, 2021

@masterofmasters13 please approve workflow, now all tests should become passed with latest idn-ruby 0.1.4.

@masterofmasters13
Copy link

masterofmasters13 commented Nov 2, 2021 via email

@dentarg
Copy link
Collaborator

dentarg commented Nov 2, 2021

@ukolovda I approved the CI, I don't know who @masterofmasters13 is, the account joined GitHub just two days ago

@ukolovda
Copy link
Contributor Author

ukolovda commented Nov 2, 2021

@ukolovda I approved the CI, I don't know who @masterofmasters13 is, the account joined GitHub just two days ago

Ohh... Sorry.
And thank you!

CI is green now.

Copy link
Collaborator

@dentarg dentarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me!

I can only see Addressable::URI::CharacterClasses::AUTHORITY being used at

:authority => self.encode_component(uri_object.authority,
Addressable::URI::CharacterClasses::AUTHORITY),

In encode_component it is then always used in this way:

def self.encode_component(component, character_class=
if character_class.kind_of?(String)
character_class = /[^#{character_class}]/
end

which triggers the warning:

$ 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\-\.\_\~\!\$\&\'\(\)\*\+\,\;\=\:\@\[\:\]]/

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.

3 participants