Schema behaves strangely (perhaps to spec?) #110

Closed
kyledrake opened this Issue Mar 25, 2013 · 2 comments

Projects

None yet

2 participants

uri = Addressable::URI.parse('derp.com') # => #<Addressable::URI:0x3fcad0559940 URI:derp.com>

uri.scheme # => nil
uri.scheme = 'http' # => "http"
uri.to_s # => "http:derp.com"

Is this correct? How would I make it output "http://" instead?

Owner

It's correct. Use heuristic_parse if you're accepting URIs as input from people who don't know what URIs are.

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment