aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2011-06-28 15:10:16 -0700
committerAndre Arko <andre@arko.net>2011-06-28 15:10:16 -0700
commitf041cf2cf7bd511c94a7e87c3db19203652680eb (patch)
tree2d6e641c551ff9d9dd5e566871db6f17eee4e082 /lib
parent4108fbb2dc77b4b5b1bf71c369ae066f23ef104b (diff)
downloadbundler-f041cf2cf7bd511c94a7e87c3db19203652680eb.tar.gz
Backport Aaron's LazySpecification fixes to stable
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/lazy_specification.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index 5924ec60..e9d6b226 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -58,13 +58,16 @@ module Bundler
private
+ def to_ary
+ nil
+ end
+
def method_missing(method, *args, &blk)
- if Gem::Specification.new.respond_to?(method)
- raise "LazySpecification has not been materialized yet (calling :#{method} #{args.inspect})" unless @specification
- @specification.send(method, *args, &blk)
- else
- super
- end
+ raise "LazySpecification has not been materialized yet (calling :#{method} #{args.inspect})" unless @specification
+
+ return super unless respond_to?(method)
+
+ @specification.send(method, *args, &blk)
end
end