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 URI.parser method, and remove 1.8.x code #4521
Conversation
It is safe to assume that |
@josevalim I'm seeing 1.9.3p0 code now. According to uri/common.rb, And it seems that URI::Parser#parse will never change internal state. ... But, I think that there were
|
If the API in 1.9 is |
According to https://github.com/rubyspec/rubyspec/tree/master/library/uri, |
I am confused by this patch. Shouldn't we just be calling |
It seems URI.parse was not there before 1.9. If it is the official 1.9 API, |
We could also simply use >> RUBY_VERSION
=> "1.8.7"
>> require 'uri'
=> true
>> URI.parse 'http://google.com/'
=> #<URI::HTTP:0x10a7d5db0 URL:http://google.com/>
>> |
@@ -13,7 +14,7 @@ def initialize(status, block) | |||
def call(env) | |||
req = Request.new(env) | |||
|
|||
uri = URI.parse(path(req.symbolized_path_parameters, req)) | |||
uri = URI.parser.parse(path(req.symbolized_path_parameters, req)) |
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.
Shouldn't this stay as URI.parse
?
Ok, closing this then. @kennyj could you please send a pull request that removes the core_ext and change Rails to rely only on |
Ok! I'll send PR. |
No description provided.