-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
Use RFC2396_PARSER explicitly to avoid the warning. #2509
Use RFC2396_PARSER explicitly to avoid the warning. #2509
Conversation
4d06152
to
53716e0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2509 +/- ##
=======================================
Coverage 98.16% 98.16%
=======================================
Files 128 128
Lines 4848 4849 +1
=======================================
+ Hits 4759 4760 +1
Misses 89 89
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! Please update to latest master though as we had some issues with the spec suite that should be fixed on master now.
53716e0
to
db9bab0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like in older rubies the constant does not exist:
uninitialized constant URI::RFC2396_PARSER
This is from 2.5 tests. There are more failing test suites with this error unfortunately, so we gotta have a fallback mechanism to make this work for old rubies too.
Thanks for checking the tests so quickly, great catch! |
Description
The URI library recently changed the
URI::DEFAULT_PARSER
toURI::RFC3986_PARSER
.https://github.com/ruby/uri/blob/master/lib/uri/common.rb#L22
Additionally, when using the
URI::RFC3986_PARSER.escape
method a warning is logged, telling that the method is obsolete and thatURI::RFC2396_PARSER.escape
should be used explicitly instead.https://github.com/ruby/uri/blob/master/lib/uri/rfc3986_parser.rb#L155-L159
This results in a lot of warnings logged to stderr. This simple fix should do the trick :)