Permalink
Browse files

Fix compatibility issue with ruby 1.8.6 (Hash[] doesn't work for 2d a…

…rrays)
  • Loading branch information...
1 parent f5a227a commit 8dec639f9461b67e05df09fa3f58de15574c431f @marios marios committed May 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/s3/s3_interface.rb
View
@@ -334,7 +334,7 @@ def list_bucket(bucket, options={}, headers={})
# ]
# }
def incrementally_list_bucket(bucket, options={}, headers={}, &block)
- internal_options = Hash[ options.map {|k,v| [k.to_sym, v] } ]
+ internal_options = (options.map {|k,v| [k.to_sym, v] }).inject({}) {|h, ar| h[ar[0]] = ar[1]; h}
begin
internal_bucket = bucket.dup
unless internal_options.nil? || internal_options.empty?

0 comments on commit 8dec639

Please sign in to comment.