-
Notifications
You must be signed in to change notification settings - Fork 51
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
URI::PATTERN NameError starting with version 1.0.0 #125
Comments
Looking at the diff from 0.13.1 to 1.0.0, I don't see this warning even with -W2 or --verbose. v0.13.1...v1.0.0#diff-936b286152b1184cde04f027289d65e633d0f3ee52fdc42cf4eb072c24312e15R48-R54 def self.const_missing(const)
if value = RFC2396_PARSER.regexp[const]
warn "URI::#{const} is obsolete. Use RFC2396_PARSER.regexp[#{const.inspect}] explicitly.", uplevel: 1 if $VERBOSE
value
else
super
end |
Please let me know why I'm not receiving the warning and what we should be using instead of URI::PATTERN. Should we be using |
I see that URI::REGEXP was also removed without a deprecation warning.
This worked in many prior rubies.
|
Can confirm the above, receiving same:
|
Thank you for reporting this. I fixed at 1f3d3df. And released 1.0.1 with that fix. |
Thank you @hsbt! Using 1.0.1, with warnings enabled, I'm now seeing the warnings for these two constants but it continues to work as it did in earlier versions. Looks good to me. Thank you for the quick response! |
Thanks in advance for your work on this library.
URI::PATTERN constant has existed for a long time, since at least ruby 2.1/ URI 0.9.11. It looks like URI 1.0.0 dropped it without deprecating it. Was this intentional?
Running all-ruby, we can see it's been there a long time. If we can't use it, please deprecate it and suggest a replacement. Thanks!
The text was updated successfully, but these errors were encountered: