Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Apr 18, 2011
1 parent 1a9b757 commit bcef5c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/mechanize/page.rb
Expand Up @@ -135,9 +135,9 @@ def canonical_uri
return unless link
href = link['href']

URI(link['href'])
URI href
rescue URI::InvalidURIError
URI Mechanize::Util.uri_escape link['href']
URI Mechanize::Util.uri_escape href
end

# Get the content type
Expand Down
2 changes: 1 addition & 1 deletion test/test_mechanize_form_encoding.rb
Expand Up @@ -114,5 +114,5 @@ def test_post_form_logs_form_encoding
assert_match ENCODING_LOG_MESSAGE, sio.string

@agent.log = nil
end
end
end

0 comments on commit bcef5c2

Please sign in to comment.