aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/lazy_specification.rb
diff options
context:
space:
mode:
authorChris Heald <cheald@gmail.com>2012-11-23 17:33:52 -0700
committerChris Heald <cheald@gmail.com>2012-11-23 17:33:52 -0700
commite19736294717ce648d6400a7a4787208a9980962 (patch)
treec72af4ab1cf25845a06cff0ec2e5e2bec46d9c53 /lib/bundler/lazy_specification.rb
parent60ef317ccd8d0801f18ee3058b55574bc76186c9 (diff)
downloadbundler-e19736294717ce648d6400a7a4787208a9980962.tar.gz
Don't construct 2 arrays every time we do a spec comparison. Allow short-circuit when specs do not match.
Diffstat (limited to 'lib/bundler/lazy_specification.rb')
-rwxr-xr-x[-rw-r--r--]lib/bundler/lazy_specification.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index b10d142b..a94719c5 100644..100755
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -26,8 +26,11 @@ module Bundler
end
def ==(other)
- [name, version, dependencies, platform, source] ==
- [other.name, other.version, other.dependencies, other.platform, other.source]
+ name == other.name &&
+ version == other.version &&
+ source == other.source &&
+ platform == other.platform &&
+ dependencies == other.dependencies
end
def satisfies?(dependency)