summaryrefslogtreecommitdiff
path: root/gem_prelude.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-28 16:22:14 (GMT)
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-28 16:22:14 (GMT)
commit4a1f1ba66e569ad2e33b1d260bf53bcffa9cedaa (patch)
treea3ad964dd3f6501d74fe14095010cf5b219e92b2 /gem_prelude.rb
parent0bd29ba21645e15403ecf72721f0efdd888ea8da (diff)
* 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
Diffstat (limited to 'gem_prelude.rb')
-rw-r--r--gem_prelude.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/gem_prelude.rb b/gem_prelude.rb
index aa874c8..63c7065 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