Skip to content
Browse files

Fix uri_escape for ruby 1.8. Issue #177

  • Loading branch information...
1 parent ecff1af commit f2baae381b46bafd682b666623204f20545ce3a6 @drbrain drbrain committed Dec 21, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/mechanize/util.rb
View
6 lib/mechanize/util.rb
@@ -85,7 +85,11 @@ def self.uri_escape str, unsafe = nil
URI
end
- unsafe ||= @parser.regexp[:UNSAFE]
+ if URI == @parser then
+ unsafe ||= URI::UNSAFE
+ else
+ unsafe ||= @parser.regexp[:UNSAFE]
+ end
@parser.escape str, unsafe
end

0 comments on commit f2baae3

Please sign in to comment.
Something went wrong with that request. Please try again.