diff options
author | Chris Heald <cheald@gmail.com> | 2012-11-23 17:33:52 -0700 |
---|---|---|
committer | Chris Heald <cheald@gmail.com> | 2012-11-23 17:33:52 -0700 |
commit | e19736294717ce648d6400a7a4787208a9980962 (patch) | |
tree | c72af4ab1cf25845a06cff0ec2e5e2bec46d9c53 /lib/bundler/lazy_specification.rb | |
parent | 60ef317ccd8d0801f18ee3058b55574bc76186c9 (diff) | |
download | bundler-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.rb | 7 |
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) |