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

ruby-changes:11445

From: nobu <ko1@a...>
Date: Thu, 26 Mar 2009 11:33:31 +0900 (JST)
Subject: [ruby-changes:11445] Ruby:r23070 (trunk): * lib/rdoc/ri/paths.rb (RDoc::RI::Paths): considers

nobu	2009-03-26 11:33:16 +0900 (Thu, 26 Mar 2009)

  New Revision: 23070

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

  Log:
    * lib/rdoc/ri/paths.rb (RDoc::RI::Paths): considers
      --program-prefix and --program-suffix.  reapplied r19923.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rdoc/ri/paths.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 23069)
+++ ChangeLog	(revision 23070)
@@ -1,3 +1,8 @@
+Thu Mar 26 11:33:13 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/rdoc/ri/paths.rb (RDoc::RI::Paths): considers
+	  --program-prefix and --program-suffix.  reapplied r19923.
+
 Wed Mar 25 07:45:12 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in (target_alias): replaces cpu with universal too.
Index: lib/rdoc/ri/paths.rb
===================================================================
--- lib/rdoc/ri/paths.rb	(revision 23069)
+++ lib/rdoc/ri/paths.rb	(revision 23070)
@@ -28,10 +28,17 @@
 
   VERSION = RbConfig::CONFIG['ruby_version']
 
-  base    = File.join(RbConfig::CONFIG['datadir'], "ri", VERSION)
+  if m = /ruby/.match(RbConfig::CONFIG['RUBY_INSTALL_NAME'])
+    m = [m.pre_match, m.post_match]
+  else
+    m = [""] * 2
+  end
+  ri = "#{m[0]}ri#{m[1]}"
+  rdoc = "#{m[0]}rdoc#{m[1]}"
+  base    = File.join(RbConfig::CONFIG['datadir'], ri, VERSION)
   SYSDIR  = File.join(base, "system")
   SITEDIR = File.join(base, "site")
-  HOMEDIR = (File.expand_path("~/.rdoc") rescue nil)
+  HOMEDIR = (File.expand_path("~/.#{rdoc}") rescue nil)
 
   begin
     require 'rubygems' unless defined?(Gem) and defined?(Gem::Enable) and

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

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