Schema behaves strangely (perhaps to spec?) #110

kyledrake opened this Issue Mar 25, 2013 · 2 comments


None yet

2 participants

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

uri.scheme # => nil
uri.scheme = 'http' # => "http"
uri.to_s # => ""

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


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