Warnings from URI::escape (obsolete since ruby 1.9.2) and some instance variables not initialized fixed
This commit is contained in:
@@ -72,6 +72,14 @@ def get_equal_string_end(stringarray = [""])
|
||||
already_found
|
||||
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")
|
||||
end
|
||||
end
|
||||
|
||||
if RUBY_VERSION < "1.9"
|
||||
class Array
|
||||
# Fix for grep with symbols in ruby <= 1.8.7
|
||||
|
||||
Reference in New Issue
Block a user