Permalink
Browse files

refs #11937, Fix Ruby 1.9.x Array#to_s conversion

  • Loading branch information...
1 parent 52ad779 commit b9c0d764317879d7da7e676fbef9134a383255dd konstantin committed Feb 21, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/awsbase/right_awsbase.rb
@@ -43,9 +43,10 @@ def self.sign(aws_secret_access_key, auth_string)
Base64.encode64(OpenSSL::HMAC.digest(@@digest1, aws_secret_access_key, auth_string)).strip
end
- # Escape a string accordingly Amazon rulles
+ # Escape a string accordingly Amazon rules
# http://docs.amazonwebservices.com/AmazonSimpleDB/2007-11-07/DeveloperGuide/index.html?REST_RESTAuth.html
def self.amz_escape(param)
+ param = param.flatten.join('') if param.is_a?(Array) # ruby 1.9.x Array#to_s fix
param.to_s.gsub(/([^a-zA-Z0-9._~-]+)/n) do
'%' + $1.unpack('H2' * $1.size).join('%').upcase
end

0 comments on commit b9c0d76

Please sign in to comment.