Skip to content

Commit

Permalink
Merge pull request rubygems#83 from tenderlove/cleanup
Browse files Browse the repository at this point in the history
Use any? rather than explicit return true / false
  • Loading branch information
evanphx committed Jun 8, 2011
2 parents 7d9376e + 985e207 commit 997b328
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/rubygems/specification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1272,17 +1272,13 @@ def conflicts
# Return true if this spec can require +file+.

def contains_requirable_file? file
root = full_gem_path
root = full_gem_path
suffixes = Gem.suffixes

require_paths.each do |lib|
require_paths.any? do |lib|
base = "#{root}/#{lib}/#{file}"
Gem.suffixes.each do |suf|
path = "#{base}#{suf}"
return true if File.file? path
end
suffixes.any? { |suf| File.file? "#{base}#{suf}" }
end

return false
end

##
Expand Down

0 comments on commit 997b328

Please sign in to comment.