Skip to content

Instantly share code, notes, and snippets.

@2called-chaos
Created November 3, 2015 18:04
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 2called-chaos/c64d56f974b0f5500c91 to your computer and use it in GitHub Desktop.
Save 2called-chaos/c64d56f974b0f5500c91 to your computer and use it in GitHub Desktop.
[2] pry(main)> require "uri"
=> true
[3] pry(main)> URI.parse(%{http://foo:"secret&me"@vcenter.com})
URI::InvalidURIError: bad URI(is not URI?): http://foo:"secret&me"@vcenter.com
from /Users/chaos/.rbenv/versions/2.1.1/lib/ruby/2.1.0/uri/common.rb:176:in `split'
[4] pry(main)> URI.parse(%{http://foo:secret&me@vcenter.com})
=> #<URI::HTTP:0x007fef4daa61a0 URL:http://foo:secret&me@vcenter.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment