lib/cloudfiles.rb in cloudfiles-1.4.11 vs lib/cloudfiles.rb in cloudfiles-1.4.12
- old
+ new
@@ -48,11 +48,11 @@
def self.lines(str)
(str.respond_to?(:lines) ? str.lines : str).to_a.map { |x| x.chomp }
end
# CGI.escape, but without special treatment on spaces
- def self.escape(str)
- str.gsub(/([^a-zA-Z0-9_.-]+)/) do
+ def self.escape(str,extra_exclude_chars = '')
+ str.gsub(/([^a-zA-Z0-9_.-#{extra_exclude_chars}]+)/) do
'%' + $1.unpack('H2' * $1.bytesize).join('%').upcase
end
end
end