Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

Commit

Permalink
ruby 1.9 support: more to_a->Array() fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin committed Mar 31, 2010
1 parent 59fe74d commit 2f59806
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ec2/right_ec2_security_groups.rb
Expand Up @@ -80,7 +80,7 @@ class Ec2
# :aws_owner=>"826693181925"}]
#
def describe_security_groups(list=[])
link = generate_request("DescribeSecurityGroups", amazonize_list('GroupName',list.to_a))
link = generate_request("DescribeSecurityGroups", amazonize_list('GroupName', list))

request_cache_or_info( :describe_security_groups, link, QEc2DescribeSecurityGroupsParser, @@bench, list.blank?) do |parser|
result = []
Expand All @@ -95,7 +95,7 @@ def describe_security_groups(list=[])
result_perm[:to_port] = permission[:to_port]
result_perm[:protocol] = permission[:ip_protocol]
# IP permissions
permission[:ip_ranges].to_a.each do |ip_range|
Array(permission[:ip_ranges]).each do |ip_range|
perm = result_perm.dup
# Mhhh... For Eucalyptus we somehow get used to use ":cidr_ip" instead of ":cidr_ips"...
if @params[:eucalyptus] then perm[:cidr_ip] = ip_range
Expand All @@ -104,7 +104,7 @@ def describe_security_groups(list=[])
aws_perms << perm
end
# Group permissions
permission[:groups].to_a.each do |group|
Array(permission[:groups]).each do |group|
perm = result_perm.dup
perm[:group] = group[:group_name]
perm[:owner] = group[:user_id]
Expand Down

0 comments on commit 2f59806

Please sign in to comment.