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

Load the pure-Ruby IDNA implementation from Addressable #120

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

dentarg
Copy link
Collaborator

@dentarg dentarg commented Feb 28, 2018

Since #113, twingly-url can only be used with the pure-Ruby implementation in Addressable.

If idn-ruby (libidn wrapper gem) is installed, Addressable will not load the pure-Ruby implementation, which breaks twingly-url.

Close #119

Since #113, twingly-url can only be used with the pure-Ruby
implementation in Addressable.

If idn-ruby (libidn wrapper gem) is installed, Addressable will not load
the pure-Ruby implementation, which breaks twingly-url.

Close #119
@walro
Copy link
Contributor

walro commented Feb 28, 2018

@dentarg
Copy link
Collaborator Author

dentarg commented Feb 28, 2018 via email

@walro
Copy link
Contributor

walro commented Feb 28, 2018

Wouldn't it "monkey patch" itself and fallback to the idn-ruby implementation again? Guess it's fairly easy to try out if we modifiy a local copy of addressable.

@walro
Copy link
Contributor

walro commented Feb 28, 2018

The require itself will solve the problem in #119, but we will still expect the pure implementation to run, not the native one. Not sure how to solve. We probably want twingly-url to play nice in both cases.

@walro
Copy link
Contributor

walro commented Feb 28, 2018

We probably want twingly-url to play nice in both cases.

Or explicitly prohibit the use of idn-ruby

@walro
Copy link
Contributor

walro commented Feb 28, 2018

... or we're fine as-is. I think we need to start run tests with the gem (idn-ruby) installed vs not installed, but might be another issue.

I'll approve this :)

Copy link
Contributor

@walro walro left a comment

Choose a reason for hiding this comment

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

This fixes the issue, but it's a symptom of something else, see: #120 (comment)

@dentarg
Copy link
Collaborator Author

dentarg commented Feb 28, 2018

Ah, I think I understand what you are getting at. That Addressable (when used by twingly-url) will behave differently if idn-ruby gem is present.

I think we need to start run tests with the gem (idn-ruby) installed

Yeah, that entered my mind too.

@dentarg dentarg merged commit 726d963 into master Feb 28, 2018
@dentarg dentarg deleted the issue/119/require-addressable-idna-pure branch February 28, 2018 12:26
@walro
Copy link
Contributor

walro commented Feb 28, 2018

Ah, I think I understand what you are getting at. That Addressable (when used by twingly-url) will behave differently if idn-ruby gem is present

Exactly, sorry for the long route to get to that.

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.

None yet

3 participants