1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gem_prelude.rb (Gem.default_dir and misc.): use rubylibprefix.

follows the chagne in r23368.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2009-05-21 10:00:48 +00:00
parent c6a24c45f8
commit 8f1f47a072
2 changed files with 9 additions and 8 deletions

View file

@ -1,3 +1,8 @@
Thu May 21 18:55:33 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* gem_prelude.rb (Gem.default_dir and misc.): use rubylibprefix.
follows the chagne in r23368.
Thu May 21 12:07:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/ruby.h (RB_EVENT_HOOKS_HAVE_CALLBACK_DATA):

View file

@ -24,6 +24,7 @@ if defined?(Gem) then
ConfigMap = {
:sitedir => RbConfig::CONFIG["sitedir"],
:ruby_version => RbConfig::CONFIG["ruby_version"],
:rubylibprefix => RbConfig::CONFIG["rubylibprefix"],
:libdir => RbConfig::CONFIG["libdir"],
:sitelibdir => RbConfig::CONFIG["sitelibdir"],
:arch => RbConfig::CONFIG["arch"],
@ -105,12 +106,8 @@ if defined?(Gem) then
if defined? RUBY_FRAMEWORK_VERSION then
File.join File.dirname(ConfigMap[:sitedir]), 'Gems',
ConfigMap[:ruby_version]
elsif RUBY_VERSION > '1.9' then
File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems',
ConfigMap[:ruby_version])
else
File.join(ConfigMap[:libdir], ruby_engine, 'gems',
ConfigMap[:ruby_version])
ConfigMap[:sitelibdir].sub(%r'/site_ruby/(?=[^/]+)', '/gems/')
end
end
@ -218,8 +215,7 @@ if defined?(Gem) then
undef_method :gem if method_defined? :gem
end
$".delete File.join(Gem::ConfigMap[:libdir],
Gem::ConfigMap[:ruby_install_name],
$".delete File.join(Gem::ConfigMap[:rubylibprefix],
Gem::ConfigMap[:ruby_version], 'rubygems.rb')
require 'rubygems'
@ -342,7 +338,7 @@ if defined?(Gem) then
begin
Gem.push_all_highest_version_gems_on_load_path
$" << File.join(Gem::ConfigMap[:libdir], Gem::ConfigMap[:ruby_install_name],
$" << File.join(Gem::ConfigMap[:rubylibprefix],
Gem::ConfigMap[:ruby_version], "rubygems.rb")
rescue Exception => e
puts "Error loading gem paths on load path in gem_prelude"