Skip to content

Commit

Permalink
ruby1.9 support: replace: 'to_s' by 'Array.join('')
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin committed Mar 31, 2010
1 parent f62b0fb commit c34972d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/s3/right_s3_interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ def canonical_string(method, path, headers={}, expires=nil) # :nodoc:
s3_headers = {}
headers.each do |key, value|
key = key.downcase
s3_headers[key] = value.to_s.strip if key[/^#{AMAZON_HEADER_PREFIX}|^content-md5$|^content-type$|^date$/o]
value = case
when value.is_?(Array) then value.join('')
else value.to_s
end
s3_headers[key] = value.strip if key[/^#{AMAZON_HEADER_PREFIX}|^content-md5$|^content-type$|^date$/o]
end
s3_headers['content-type'] ||= ''
s3_headers['content-md5'] ||= ''
Expand Down

0 comments on commit c34972d

Please sign in to comment.