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

ruby-changes:17378

From: nobu <ko1@a...>
Date: Fri, 1 Oct 2010 17:05:19 +0900 (JST)
Subject: [ruby-changes:17378] Ruby:r29383 (ruby_1_8): * lib/rdoc/ri/ri_paths.rb (RI::Paths): use RbConfig instead of

nobu	2010-10-01 16:54:26 +0900 (Fri, 01 Oct 2010)

  New Revision: 29383

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

  Log:
    * lib/rdoc/ri/ri_paths.rb (RI::Paths): use RbConfig instead of
      obsolete and deprecated Config.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/lib/rbconfig/obsolete.rb
    branches/ruby_1_8/lib/rdoc/ri/ri_paths.rb
    branches/ruby_1_8/test/dbm/test_dbm.rb
    branches/ruby_1_8/test/gdbm/test_gdbm.rb

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 29382)
+++ ruby_1_8/ChangeLog	(revision 29383)
@@ -1,3 +1,8 @@
+Fri Oct  1 16:54:19 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/rdoc/ri/ri_paths.rb (RI::Paths): use RbConfig instead of
+	  obsolete and deprecated Config.
+
 Fri Oct  1 15:12:05 2010  NAKAMURA Usaku  <usa@r...>
 
 	* win32/win32.c (init_stdhandle): redirect unopened IOs to NUL.
Index: ruby_1_8/lib/rdoc/ri/ri_paths.rb
===================================================================
--- ruby_1_8/lib/rdoc/ri/ri_paths.rb	(revision 29382)
+++ ruby_1_8/lib/rdoc/ri/ri_paths.rb	(revision 29383)
@@ -26,9 +26,9 @@
 
     DOC_DIR  = "doc/rdoc"
 
-    version = Config::CONFIG['ruby_version']
+    version = RbConfig::CONFIG['ruby_version']
 
-    base    = File.join(Config::CONFIG['datadir'], "ri", version)
+    base    = File.join(RbConfig::CONFIG['datadir'], "ri", version)
     SYSDIR  = File.join(base, "system")
     SITEDIR = File.join(base, "site")
     homedir = ENV['HOME'] || ENV['USERPROFILE'] || ENV['HOMEPATH']
Index: ruby_1_8/lib/rbconfig/obsolete.rb
===================================================================
--- ruby_1_8/lib/rbconfig/obsolete.rb	(revision 29382)
+++ ruby_1_8/lib/rbconfig/obsolete.rb	(revision 29383)
@@ -1,2 +1,2 @@
-warn "Use RbConfig instead of obsolete and deprecated Config."
+warn "#{caller[0]}: Use RbConfig instead of obsolete and deprecated Config."
 Config = RbConfig # compatibility for ruby-1.8.4 and older.
Index: ruby_1_8/test/dbm/test_dbm.rb
===================================================================
--- ruby_1_8/test/dbm/test_dbm.rb	(revision 29382)
+++ ruby_1_8/test/dbm/test_dbm.rb	(revision 29383)
@@ -12,7 +12,7 @@
   class TestDBM < Test::Unit::TestCase
     def TestDBM.uname_s
       require 'rbconfig'
-      case Config::CONFIG['target_os']
+      case RbConfig::CONFIG['target_os']
       when 'cygwin'
         require 'Win32API'
         uname = Win32API.new('cygwin1', 'uname', 'P', 'I')
@@ -21,7 +21,7 @@
 
         utsname.unpack('A20' * 5)[0]
       else
-        Config::CONFIG['target_os']
+        RbConfig::CONFIG['target_os']
       end
     end
     SYSTEM = uname_s
Index: ruby_1_8/test/gdbm/test_gdbm.rb
===================================================================
--- ruby_1_8/test/gdbm/test_gdbm.rb	(revision 29382)
+++ ruby_1_8/test/gdbm/test_gdbm.rb	(revision 29383)
@@ -12,7 +12,7 @@
   class TestGDBM < Test::Unit::TestCase
     def TestGDBM.uname_s
       require 'rbconfig'
-      case Config::CONFIG['target_os']
+      case RbConfig::CONFIG['target_os']
       when 'cygwin'
         require 'Win32API'
         uname = Win32API.new('cygwin1', 'uname', 'P', 'I')
@@ -21,7 +21,7 @@
 
         utsname.unpack('A20' * 5)[0]
       else
-        Config::CONFIG['target_os']
+        RbConfig::CONFIG['target_os']
       end
     end
     SYSTEM = uname_s

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

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