aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-11-01 10:38:02 +0100
committerJeremy Kemper <jeremy@bitsweat.net>2009-11-02 17:50:12 -0800
commita2de13e1e0de5bba3cbd6050fe4884595704e1e2 (patch)
tree202994595c109501dddaa84de0a69082e7e30d59 /activesupport/lib/active_support/core_ext
parent36121d29a53c71cbdf4f0280718d572f16360f8c (diff)
downloadrails-a2de13e1e0de5bba3cbd6050fe4884595704e1e2.tar.gz
rails-a2de13e1e0de5bba3cbd6050fe4884595704e1e2.tar.bz2
rails-a2de13e1e0de5bba3cbd6050fe4884595704e1e2.zip
Ruby 1.9.2: URI.escape is obsolete
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/uri.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/uri.rb b/activesupport/lib/active_support/core_ext/uri.rb
index 9a1c61d99b..ca1be8b7e9 100644
--- a/activesupport/lib/active_support/core_ext/uri.rb
+++ b/activesupport/lib/active_support/core_ext/uri.rb
@@ -4,7 +4,8 @@ if RUBY_VERSION >= '1.9'
str = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E" # Ni-ho-nn-go in UTF-8, means Japanese.
str.force_encoding(Encoding::UTF_8) if str.respond_to?(:force_encoding)
- unless str == URI.unescape(URI.escape(str))
+ parser = URI::Parser.new
+ unless str == parser.unescape(parser.escape(str))
URI::Parser.class_eval do
remove_method :unescape
def unescape(str, escaped = @regexp[:ESCAPED])