lib/fog/aws/models/compute/image.rb in fog-0.3.26 vs lib/fog/aws/models/compute/image.rb in fog-0.3.27
- old
+ new
@@ -25,10 +25,10 @@
def deregister(delete_snapshot = false)
connection.deregister_image(id)
if(delete_snapshot && root_device_type == "ebs")
- block_device = block_device_mapping.select {|block_device| block_device['deviceName'] == root_device_name}
+ block_device = block_device_mapping.detect {|block_device| block_device['deviceName'] == root_device_name}
@connection.snapshots.new(:id => block_device['snapshotId']).destroy
else
true
end
end