incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject ruby 1.8.6 and aws gem compatibility issue
Date Fri, 27 May 2011 16:28:15 GMT

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[ {|k,v| [k.to_sym, v] } ]

where 'options' is a hash, and ' {|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

The workaround uses '.inject' (I've made a pull request from the appoxy 
guys )


View raw message