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

ruby-changes:15292

From: nobu <ko1@a...>
Date: Fri, 2 Apr 2010 13:52:23 +0900 (JST)
Subject: [ruby-changes:15292] Ruby:r27177 (trunk): * lib/rdoc/ri/paths.rb (RDoc::HOMEDIR): expand_path deals with

nobu	2010-04-02 13:52:03 +0900 (Fri, 02 Apr 2010)

  New Revision: 27177

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

  Log:
    * lib/rdoc/ri/paths.rb (RDoc::HOMEDIR): expand_path deals with
      platform dependent envirionments.  reapplied r21312.

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27176)
+++ ChangeLog	(revision 27177)
@@ -1,3 +1,8 @@
+Fri Apr  2 13:51:52 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/rdoc/ri/paths.rb (RDoc::HOMEDIR): expand_path deals with
+	  platform dependent envirionments.  reapplied r21312.
+
 Fri Apr  2 12:52:25 2010  NAKAMURA Usaku  <usa@r...>
 
 	* lib/rdoc/parser.rb (binary?): regression.
Index: lib/rdoc/ri/paths.rb
===================================================================
--- lib/rdoc/ri/paths.rb	(revision 27176)
+++ lib/rdoc/ri/paths.rb	(revision 27177)
@@ -13,12 +13,8 @@
   base    = File.join RbConfig::CONFIG['datadir'], "ri", version
   SYSDIR  = File.join base, "system"
   SITEDIR = File.join base, "site"
-  homedir = File.expand_path('~') ||
-            ENV['HOME'] || ENV['USERPROFILE'] || ENV['HOMEPATH']
+  HOMEDIR = (File.expand_path("~/.rdoc") rescue nil)
 
-  HOMEDIR = if homedir then
-              File.join homedir, ".rdoc"
-            end
   #:startdoc:
 
   @gemdirs = nil

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

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