Skip to content

Instantly share code, notes, and snippets.

@kaiwren
Created October 8, 2010 10:27
Show Gist options
  • Save kaiwren/616603 to your computer and use it in GitHub Desktop.
Save kaiwren/616603 to your computer and use it in GitHub Desktop.
ruby-1.8.7-p174 > u = URI.parse('http://foo:bar@localhost:3000')
=> #<URI::HTTP:0x101e2bc40 URL:http://foo:bar@localhost:3000>
ruby-1.8.7-p174 > u.user=nil
=> nil
ruby-1.8.7-p174 > u
=> #<URI::HTTP:0x101e2bc40 URL:http://localhost:3000>
ruby-1.8.7-p174 > u.to_s
=> "http://localhost:3000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment