mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to RubyGems 1.3.4 r2223
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a6afbaeb3b
commit
31c94ffeb5
126 changed files with 7610 additions and 3747 deletions
|
@ -20,8 +20,13 @@ module Gem
|
|||
if defined? RUBY_FRAMEWORK_VERSION then
|
||||
File.join File.dirname(ConfigMap[:sitedir]), 'Gems',
|
||||
ConfigMap[:ruby_version]
|
||||
# 1.9.2dev reverted to 1.8 style path
|
||||
elsif RUBY_VERSION > '1.9' and RUBY_VERSION < '1.9.2' then
|
||||
File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems',
|
||||
ConfigMap[:ruby_version])
|
||||
else
|
||||
ConfigMap[:sitelibdir].sub(%r'/site_ruby/(?=[^/]+)', '/gems/')
|
||||
File.join(ConfigMap[:libdir], ruby_engine, 'gems',
|
||||
ConfigMap[:ruby_version])
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -37,15 +42,25 @@ module Gem
|
|||
# Default gem load path
|
||||
|
||||
def self.default_path
|
||||
[user_dir, default_dir]
|
||||
if File.exist?(Gem.user_home)
|
||||
[user_dir, default_dir]
|
||||
else
|
||||
[default_dir]
|
||||
end
|
||||
end
|
||||
|
||||
##
|
||||
# Deduce Ruby's --program-prefix and --program-suffix from its install name
|
||||
|
||||
def self.default_exec_format
|
||||
baseruby = ConfigMap[:BASERUBY] || 'ruby'
|
||||
ConfigMap[:RUBY_INSTALL_NAME].sub(baseruby, '%s') rescue '%s'
|
||||
exec_format = ConfigMap[:ruby_install_name].sub('ruby', '%s') rescue '%s'
|
||||
|
||||
unless exec_format =~ /%s/ then
|
||||
raise Gem::Exception,
|
||||
"[BUG] invalid exec_format #{exec_format.inspect}, no %s"
|
||||
end
|
||||
|
||||
exec_format
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue