Skip to content

Commit

Permalink
Ruby 1.8.7 and 1.9.2 raise an exception upon URI URI "http://example"
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed May 2, 2012
1 parent bdaa724 commit 34bf76a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/mechanize/http/auth_store.rb
Expand Up @@ -38,7 +38,7 @@ def initialize
# 2617. If +domain+ is given it is only used for NTLM authentication.

def add_auth uri, user, pass, realm = nil, domain = nil
uri = URI uri
uri = URI uri unless URI === uri

raise ArgumentError,
'NTLM domain given with realm which NTLM does not use' if
Expand Down Expand Up @@ -90,7 +90,7 @@ def credentials? uri, challenges
# Retrieves credentials for +realm+ on the server at +uri+.

def credentials_for uri, realm
uri = URI uri
uri = URI uri unless URI === uri

uri += '/'

Expand All @@ -104,7 +104,7 @@ def credentials_for uri, realm
# set all credentials for the server at +uri+ are removed.

def remove_auth uri, realm = nil
uri = URI uri
uri = URI uri unless URI === uri

uri += '/'

Expand Down

0 comments on commit 34bf76a

Please sign in to comment.