ruby-changes:11586
From: yugui <ko1@a...>
Date: Sun, 19 Apr 2009 22:34:49 +0900 (JST)
Subject: [ruby-changes:11586] Ruby:r23224 (ruby_1_9_1): merges r23070 from trunk into ruby_1_9_1.
yugui 2009-04-19 22:34:21 +0900 (Sun, 19 Apr 2009) New Revision: 23224 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23224 Log: merges r23070 from trunk into ruby_1_9_1. -- * lib/rdoc/ri/paths.rb (RDoc::RI::Paths): considers --program-prefix and --program-suffix. reapplied r19923. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/lib/rdoc/ri/paths.rb Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 23223) +++ ruby_1_9_1/ChangeLog (revision 23224) @@ -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. + Mon Mar 23 21:41:14 2009 Akinori MUSHA <knu@i...> * ext/dbm/dbm.c (fdbm_initialize): Make the file variable Index: ruby_1_9_1/lib/rdoc/ri/paths.rb =================================================================== --- ruby_1_9_1/lib/rdoc/ri/paths.rb (revision 23223) +++ ruby_1_9_1/lib/rdoc/ri/paths.rb (revision 23224) @@ -28,13 +28,20 @@ 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 = ENV['HOME'] || ENV['USERPROFILE'] || ENV['HOMEPATH'] if homedir then - HOMEDIR = File.join(homedir, ".rdoc") + HOMEDIR = File.join(homedir, ".#{rdoc}") else HOMEDIR = nil end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/