mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
Update to RubyGems 0.9.5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cae4fb76dc
commit
db74541efe
19 changed files with 275 additions and 95 deletions
|
@ -138,7 +138,14 @@ module Gem
|
|||
##
|
||||
# An Array of Regexps that match windows ruby platforms.
|
||||
|
||||
WIN_PATTERNS = [/mswin/i, /mingw/i, /bccwin/i, /wince/i]
|
||||
WIN_PATTERNS = [
|
||||
/bccwin/i,
|
||||
/cygwin/i,
|
||||
/djgpp/i,
|
||||
/mingw/i,
|
||||
/mswin/i,
|
||||
/wince/i,
|
||||
]
|
||||
|
||||
##
|
||||
# Is this a windows platform?
|
||||
|
@ -212,8 +219,7 @@ module Gem
|
|||
install_dir.to_s == Gem.default_dir
|
||||
|
||||
if defined? RUBY_FRAMEWORK_VERSION then # mac framework support
|
||||
File.join(File.dirname(Config::CONFIG["sitedir"]),
|
||||
File.basename(Config::CONFIG["bindir"]))
|
||||
'/usr/bin'
|
||||
else # generic install
|
||||
Config::CONFIG['bindir']
|
||||
end
|
||||
|
@ -225,7 +231,11 @@ module Gem
|
|||
#
|
||||
def path
|
||||
@gem_path ||= nil
|
||||
set_paths(ENV['GEM_PATH']) unless @gem_path
|
||||
unless @gem_path
|
||||
paths = [ENV['GEM_PATH']]
|
||||
paths << APPLE_GEM_HOME if defined? APPLE_GEM_HOME
|
||||
set_paths(paths.compact.join(File::PATH_SEPARATOR))
|
||||
end
|
||||
@gem_path
|
||||
end
|
||||
|
||||
|
@ -519,7 +529,7 @@ module Gem
|
|||
# not specified in the environment.
|
||||
def default_dir
|
||||
if defined? RUBY_FRAMEWORK_VERSION
|
||||
return File.join(File.dirname(Config::CONFIG["sitedir"]), "Gems")
|
||||
return File.join(File.dirname(Config::CONFIG["sitedir"]), "Gems", Config::CONFIG['ruby_version'])
|
||||
else
|
||||
File.join(Config::CONFIG['libdir'], 'ruby', 'gems', Config::CONFIG['ruby_version'])
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue