Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Use .any? instead of !.empty?
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Lance committed Mar 20, 2015
1 parent eb99167 commit 1f5404d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bundler/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ def lock_version
lock_ver = ""
curr_ver = ""

if !lockfile.empty? and lockfile.match(/^ \[(.*)\]$/)
if lockfile.any? and lockfile.match(/^ \[(.*)\]$/)
lock_ver = $1
curr_ver = Bundler::VERSION
end

if !lock_ver.empty? and !curr_ver.empty?
if lock_ver.any? and curr_ver.any?
if Gem::Version.new(curr_ver) >= Gem::Version.new(lock_ver)
ver = curr_ver
else
Expand Down

0 comments on commit 1f5404d

Please sign in to comment.