Skip to content

Instantly share code, notes, and snippets.

@skalee
Last active October 16, 2017 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skalee/90cf40bfa4a455592892cd3fc80574d2 to your computer and use it in GitHub Desktop.
Save skalee/90cf40bfa4a455592892cd3fc80574d2 to your computer and use it in GitHub Desktop.
URI stdlib Addressable

''

"#<URI::Generic >"

"#<Addressable::URI:0x3fee8408a4f0 URI:>"

' '

"error"

"#<Addressable::URI:0x3fee84087e6c URI: >"

' http:://ok.com '

"error"

"error"

'http:://ok.com'

"#<URI::HTTP http:://ok.com>"

"#<Addressable::URI:0x3fee84087264 URI:http:://ok.com>"

'ok.com'

"#<URI::Generic ok.com>"

"#<Addressable::URI:0x3fee8481fecc URI:ok.com>"

'ok.com/search'

"#<URI::Generic ok.com/search>"

"#<Addressable::URI:0x3fee8481f878 URI:ok.com/search>"

'ok'

"#<URI::Generic ok>"

"#<Addressable::URI:0x3fee8481f2b0 URI:ok>"

'http://ok'

"#<URI::HTTP http://ok>"

"#<Addressable::URI:0x3fee840678d8 URI:http://ok>"

'//ok'

"#<URI::Generic //ok>"

"#<Addressable::URI:0x3fee8405758c URI://ok>"

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