diff --git a/lib/aws/s3/connection.rb b/lib/aws/s3/connection.rb index 85dee2d..b771c60 100644 --- a/lib/aws/s3/connection.rb +++ b/lib/aws/s3/connection.rb @@ -10,7 +10,7 @@ def prepare_path(path) path = path.remove_extended unless path.valid_utf8? # Escape square brackets and single quotes - URI.escape(path).gsub(/[\[\]']/) { |m| "%%%02x" % m[0] } + URI.escape(path).gsub(/[\[\]']/) { |m| "%%%02x" % m[0].ord } end end @@ -277,4 +277,4 @@ def validate(options) end end end -end \ No newline at end of file +end