Hi,

I've come across another compatibility issue with the aws gem (ec2/s3 driver) and ruby 1.8.6. The error occurs if you are trying to list your s3 buckets and is thrown in aws-2.5.3/lib/s3/s3_interface.rb line 337 ('def incrementally_list_bucket'). The offending line looks like:

internal_options = Hash[ options.map {|k,v| [k.to_sym, v] } ]

where 'options' is a hash, and 'options.map {|k,v| [k.to_sym, v] }' gives you a 2d array. In ruby 1.8.6 the constructor 'Hash[]' doesn't work for 2d arrays but this is fine in 1.8.7 and 1.9 (discussed here http://stackoverflow.com/questions/740732/converting-an-array-of-keys-and-an-array-of-values-into-a-hash-in-ruby). The workaround uses '.inject' (I've made a pull request from the appoxy guys https://github.com/appoxy/aws/pull/92 )

marios


Reply via email to