Open
Description
Steps to Reproduce
-
Environment:
gems/ruby-3.3.7@x/gems/uri-1.0.3 -
Steps:
Open an Pry/IRB session.
Run:
URI.parse('www.google.com').class
=> URI::Generic
URI.parse('https://www.google.com').class
=> URI::HTTPS
In my production code, I have
URI.parse('www.google.com').open
=> NoMethodError: private method `open' called for an instance of URI::Generic (NoMethodError)
This got me reading the URI source code.
I think that URI::Generic
should implement open
as a public method and throw an error that explains the issue if its called.
This cost me over an hour. - it must have caught others.
Otherwise. I will need to write a wrapper for URI.parse.
Metadata
Metadata
Assignees
Labels
No labels