From e3e645f43a3a2382a4fc38a5420e89b351c5b0c1 Mon Sep 17 00:00:00 2001 From: yugui Date: Tue, 28 Oct 2008 08:21:50 +0000 Subject: [PATCH] merged r19975 and r19978 from ruby_1_9_1 into trunk. * gem_prelude.rb: considers --program-suffix and prefix configure options. * lib/rubygems/defaults.rb: ditto. * test/rubygems/test_gem.rb (@default_dir_re): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 9 +++++++++ gem_prelude.rb | 4 ++-- lib/rubygems/defaults.rb | 2 +- test/rubygems/test_gem.rb | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e7d88c72dc..f04d1b251e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Tue Oct 28 16:56:31 2008 Yuki Sonoda (Yugui) + + * gem_prelude.rb: merged from ruby_1_9_1 branch. + considers --program-suffix and prefix configure options. + + * lib/rubygems/defaults.rb: ditto. + + * test/rubygems/test_gem.rb (@default_dir_re): ditto. + Tue Oct 28 16:13:36 2008 Nobuyoshi Nakada * tool/make-snapshot: use String#bytesize. diff --git a/gem_prelude.rb b/gem_prelude.rb index 422110224b..7c54bdd9d3 100644 --- a/gem_prelude.rb +++ b/gem_prelude.rb @@ -113,7 +113,7 @@ if defined?(Gem) then undef_method :gem if method_defined? :gem end - $".delete File.join(Gem::ConfigMap[:libdir], 'ruby', + $".delete File.join(Gem::ConfigMap[:libdir], Gem::ConfigMap[:ruby_install_name], Gem::ConfigMap[:ruby_version], 'rubygems.rb') require 'rubygems' @@ -230,7 +230,7 @@ if defined?(Gem) then begin Gem.push_all_highest_version_gems_on_load_path - $" << File.join(Gem::ConfigMap[:libdir], "ruby", + $" << File.join(Gem::ConfigMap[:libdir], Gem::ConfigMap[:ruby_install_name], Gem::ConfigMap[:ruby_version], "rubygems.rb") rescue Exception => e puts "Error loading gem paths on load path in gem_prelude" diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb index c894bf41be..315d12a484 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb @@ -21,7 +21,7 @@ module Gem File.join File.dirname(ConfigMap[:sitedir]), 'Gems', ConfigMap[:ruby_version] else - File.join(ConfigMap[:libdir], ruby_engine, 'gems', + File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems', ConfigMap[:ruby_version]) end end diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 16260f772d..242d0cee60 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -11,7 +11,7 @@ class TestGem < RubyGemTestCase super @additional = %w[a b].map { |d| File.join @tempdir, d } - @default_dir_re = %r|/[Rr]uby/[Gg]ems/[0-9.]+| + @default_dir_re = %r|/\.*?[Rr]uby.*?/[Gg]ems/[0-9.]+| end def test_self_all_load_paths