diff options
Diffstat (limited to 'lib/rubygems/basic_specification.rb')
-rw-r--r-- | lib/rubygems/basic_specification.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb index 54242983ff..d1878021ba 100644 --- a/lib/rubygems/basic_specification.rb +++ b/lib/rubygems/basic_specification.rb @@ -65,10 +65,10 @@ class Gem::BasicSpecification ## # Return true if this spec can require +file+. - def contains_requirable_file? file - if @ignored then + def contains_requirable_file?(file) + if @ignored return false - elsif missing_extensions? then + elsif missing_extensions? @ignored = true warn "Ignoring #{full_name} because its extensions are not built. " + @@ -124,7 +124,7 @@ class Gem::BasicSpecification # default Ruby platform. def full_name - if platform == Gem::Platform::RUBY or platform.nil? then + if platform == Gem::Platform::RUBY or platform.nil? "#{name}-#{version}".dup.untaint else "#{name}-#{version}-#{platform}".dup.untaint @@ -160,8 +160,8 @@ class Gem::BasicSpecification # Full path of the target library file. # If the file is not in this gem, return nil. - def to_fullpath path - if activated? then + def to_fullpath(path) + if activated? @paths_map ||= {} @paths_map[path] ||= begin @@ -249,7 +249,7 @@ class Gem::BasicSpecification def source_paths paths = raw_require_paths.dup - if have_extensions? then + if have_extensions? ext_dirs = extensions.map do |extension| extension.split(File::SEPARATOR, 2).first end.uniq @@ -263,7 +263,7 @@ class Gem::BasicSpecification ## # Return all files in this gem that match for +glob+. - def matches_for_glob glob # TODO: rename? + def matches_for_glob(glob) # TODO: rename? # TODO: do we need these?? Kill it glob = File.join(self.lib_dirs_glob, glob) @@ -276,7 +276,7 @@ class Gem::BasicSpecification def lib_dirs_glob dirs = if self.raw_require_paths - if self.raw_require_paths.size > 1 then + if self.raw_require_paths.size > 1 "{#{self.raw_require_paths.join(',')}}" else self.raw_require_paths.first @@ -316,7 +316,7 @@ class Gem::BasicSpecification def have_extensions?; !extensions.empty?; end - def have_file? file, suffixes + def have_file?(file, suffixes) return true if raw_require_paths.any? do |path| base = File.join(gems_dir, full_name, path.untaint, file).untaint suffixes.any? { |suf| File.file? base + suf } |