[前][次][番号順一覧][スレッド一覧]

ruby-changes:14368

From: nobu <ko1@a...>
Date: Wed, 30 Dec 2009 14:15:53 +0900 (JST)
Subject: [ruby-changes:14368] Ruby:r26198 (trunk): * lib/rubygems.rb: Kernel#gem is already defined, and workaround

nobu	2009-12-30 14:13:09 +0900 (Wed, 30 Dec 2009)

  New Revision: 26198

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26198

  Log:
    * lib/rubygems.rb: Kernel#gem is already defined, and workaround
      for home directory and custom_require are no longer needed.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems.rb
    trunk/version.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26197)
+++ ChangeLog	(revision 26198)
@@ -1,3 +1,8 @@
+Wed Dec 30 14:13:06 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/rubygems.rb: Kernel#gem is already defined, and workaround
+	  for home directory and custom_require are no longer needed.
+
 Tue Dec 29 16:03:33 2009  NARUSE, Yui  <naruse@r...>
 
 	* numeric.c (Init_Numeric): Add Float::INFINITY and Float::NAN.
Index: lib/rubygems.rb
===================================================================
--- lib/rubygems.rb	(revision 26197)
+++ lib/rubygems.rb	(revision 26198)
@@ -35,6 +35,8 @@
 end
 
 module Kernel
+  # defined in gem_prelude.rb
+  undef gem
 
   ##
   # Use Kernel#gem to activate a specific version of +gem_name+.
@@ -534,26 +536,8 @@
 
   ##
   # Finds the user's home directory.
-  #--
-  # Some comments from the ruby-talk list regarding finding the home
-  # directory:
-  #
-  #   I have HOME, USERPROFILE and HOMEDRIVE + HOMEPATH. Ruby seems
-  #   to be depending on HOME in those code samples. I propose that
-  #   it should fallback to USERPROFILE and HOMEDRIVE + HOMEPATH (at
-  #   least on Win32).
 
   def self.find_home
-    unless RUBY_VERSION > '1.9' then
-      ['HOME', 'USERPROFILE'].each do |homekey|
-        return ENV[homekey] if ENV[homekey]
-      end
-
-      if ENV['HOMEDRIVE'] && ENV['HOMEPATH'] then
-        return "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}"
-      end
-    end
-
     File.expand_path "~"
   rescue
     if File::ALT_SEPARATOR then
@@ -1104,10 +1088,6 @@
 
 require 'rubygems/config_file'
 
-if RUBY_VERSION < '1.9' then
-  require 'rubygems/custom_require'
-end
-
 Gem.clear_paths
 
 plugins = Gem.find_files 'rubygems_plugin'
Index: version.h
===================================================================
--- version.h	(revision 26197)
+++ version.h	(revision 26198)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2009-12-29"
+#define RUBY_RELEASE_DATE "2009-12-30"
 #define RUBY_PATCHLEVEL -1
 #define RUBY_BRANCH_NAME "trunk"
 
@@ -8,7 +8,7 @@
 #define RUBY_VERSION_TEENY 1
 #define RUBY_RELEASE_YEAR 2009
 #define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 29
+#define RUBY_RELEASE_DAY 30
 
 #include "ruby/version.h"
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]