Permalink
Browse files

Fix whitespace and such

git-svn-id: http://rubygems.rubyforge.org/svn/trunk@1790 3d4018f9-ac1a-0410-99e9-8a154d859a19
  • Loading branch information...
1 parent 44ca8f1 commit e7849806df1778ccd8633dea8f776162c8ee7e09 drbrain committed Jun 20, 2008
Showing with 7 additions and 6 deletions.
  1. +7 −6 lib/rubygems.rb
View
@@ -208,17 +208,18 @@ def self.all_partials(gemdir)
##
# See if a given gem is available.
-
+
def self.available?(gem, *requirements)
requirements = Gem::Requirement.default if requirements.empty?
-
- unless gem.respond_to?(:name) && gem.respond_to?(:version_requirements)
- gem = Gem::Dependency.new(gem, requirements)
+
+ unless gem.respond_to?(:name) and
+ gem.respond_to?(:version_requirements) then
+ gem = Gem::Dependency.new gem, requirements
end
-
+
!Gem.source_index.search(gem).empty?
end
-
+
##
# The mode needed to read a file as straight binary.

0 comments on commit e784980

Please sign in to comment.