1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

the list returned from slice needs to be cloned so it won't bomb out with lazy loading

This commit is contained in:
Eric Abbott 2011-03-05 00:29:59 +08:00 committed by Wesley Beary
parent 045b371f62
commit 7ec4315065

View file

@ -5,7 +5,7 @@ module Fog
include Fog::Attributes::InstanceMethods include Fog::Attributes::InstanceMethods
Array.public_instance_methods(false).each do |method| Array.public_instance_methods(false).each do |method|
unless [:reject, :select].include?(method.to_sym) unless [:reject, :select, :slice].include?(method.to_sym)
class_eval <<-RUBY class_eval <<-RUBY
def #{method}(*args) def #{method}(*args)
unless @loaded unless @loaded
@ -17,7 +17,7 @@ module Fog
end end
end end
%w[reject select].each do |method| %w[reject select slice].each do |method|
class_eval <<-RUBY class_eval <<-RUBY
def #{method}(*args) def #{method}(*args)
unless @loaded unless @loaded