mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
08aa6d59a2
Fixed extension directory in Gem::Specification#require_paths. Allow installation of gems when $HOME is nonexistent or unwritable. Use proper API in InstallCommand. Improve support for path option in gem dependency files. Remove warnings. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
29 lines
384 B
Ruby
29 lines
384 B
Ruby
class Gem::Source::Installed < Gem::Source
|
|
|
|
def initialize
|
|
@uri = nil
|
|
end
|
|
|
|
##
|
|
# Installed sources sort before all other sources
|
|
|
|
def <=> other
|
|
case other
|
|
when Gem::Source::Installed then
|
|
0
|
|
when Gem::Source then
|
|
1
|
|
else
|
|
nil
|
|
end
|
|
end
|
|
|
|
##
|
|
# We don't need to download an installed gem
|
|
|
|
def download spec, path
|
|
nil
|
|
end
|
|
|
|
end
|
|
|