From 4a1f1ba66e569ad2e33b1d260bf53bcffa9cedaa Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 28 Jun 2009 16:22:14 +0000 Subject: * gem_prelude.c (Gem.default_dir): follows the change on lib/rubygems/default.rb in r23879 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gem_prelude.rb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'gem_prelude.rb') diff --git a/gem_prelude.rb b/gem_prelude.rb index aa874c88ea..63c70653d0 100644 --- a/gem_prelude.rb +++ b/gem_prelude.rb @@ -91,29 +91,32 @@ if defined?(Gem) then end # begin rubygems/defaults - + @post_install_hooks ||= [] @post_uninstall_hooks ||= [] @pre_uninstall_hooks ||= [] @pre_install_hooks ||= [] - + ## # An Array of the default sources that come with RubyGems - + def self.default_sources %w[http://gems.rubyforge.org/] end - + ## # Default home directory path to be used if an alternate value is not # specified in the environment - + def self.default_dir 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 + elsif RUBY_VERSION >= '1.9.2' then + File.join(ConfigMap[:rubylibprefix], 'gems', + ConfigMap[:ruby_version]) + # only Ruby 1.9.1 has a peculiar feature + elsif RUBY_VERSION > '1.9' and File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems', ConfigMap[:ruby_version]) else -- cgit v1.2.1