aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--gem_prelude.rb17
2 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d7af8540cf..a466a6bc5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jun 28 23:10:55 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * gem_prelude.c (Gem.default_dir): follows the change on
+ lib/rubygems/default.rb in r23879
+
Sun Jun 28 23:32:11 2009 Tadayoshi Funaba <tadf@dotrb.org>
* complex.c (nucomp_div): raises ZeroDivisionError immediately
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