From 7ec43150651136eaf60b880c3e3902e93f4e2a54 Mon Sep 17 00:00:00 2001 From: Eric Abbott Date: Sat, 5 Mar 2011 00:29:59 +0800 Subject: [PATCH] the list returned from slice needs to be cloned so it won't bomb out with lazy loading --- lib/fog/core/collection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fog/core/collection.rb b/lib/fog/core/collection.rb index 640648224..6875cb766 100644 --- a/lib/fog/core/collection.rb +++ b/lib/fog/core/collection.rb @@ -5,7 +5,7 @@ module Fog include Fog::Attributes::InstanceMethods 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 def #{method}(*args) unless @loaded @@ -17,7 +17,7 @@ module Fog end end - %w[reject select].each do |method| + %w[reject select slice].each do |method| class_eval <<-RUBY def #{method}(*args) unless @loaded