Rspec for previous commit

URI.escape is now only overriden for ruby >= 1.9.2
RDoc
This commit is contained in:
Erwan
2012-10-23 18:44:41 +02:00
parent d438f37f57
commit 7e8d06ac0a
81 changed files with 2259 additions and 235 deletions

View File

@@ -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