Rspec for previous commit
URI.escape is now only overriden for ruby >= 1.9.2 RDoc
This commit is contained in:
@@ -74,9 +74,11 @@ end
|
||||
|
||||
# Since ruby 1.9.2, URI::escape is obsolete
|
||||
# See http://rosettacode.org/wiki/URL_encoding#Ruby and http://www.ruby-forum.com/topic/207489
|
||||
module URI
|
||||
def self.escape(str)
|
||||
URI.encode_www_form_component(str).gsub("+", "%20")
|
||||
if RUBY_VERSION >= "1.9.2"
|
||||
module URI
|
||||
def self.escape(str)
|
||||
URI.encode_www_form_component(str).gsub("+", "%20")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user