Skip to content

Instantly share code, notes, and snippets.

@radar
Created July 16, 2018 07:35
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 radar/fa41eb43d5c3579ba0fba9ae7c4e62c1 to your computer and use it in GitHub Desktop.
Save radar/fa41eb43d5c3579ba0fba9ae7c4e62c1 to your computer and use it in GitHub Desktop.
URI.parse("127.0.0.1")
# => #<URI::Generic 127.0.0.1>
URI.parse("localhost")
# => #<URI::Generic localhost>
URI.parse("127.0.0.1:6379")
# => URI::InvalidURIError (bad URI(is not URI?): 127.0.0.1:6379)
URI.parse("localhost:6379")
# => #<URI::Generic localhost:6379>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment