diff options
author | Andre Arko <andre@arko.net> | 2011-06-28 15:10:16 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2011-06-28 15:10:16 -0700 |
commit | f041cf2cf7bd511c94a7e87c3db19203652680eb (patch) | |
tree | 2d6e641c551ff9d9dd5e566871db6f17eee4e082 /lib | |
parent | 4108fbb2dc77b4b5b1bf71c369ae066f23ef104b (diff) | |
download | bundler-f041cf2cf7bd511c94a7e87c3db19203652680eb.tar.gz |
Backport Aaron's LazySpecification fixes to stable
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/lazy_specification.rb | 15 |
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 |