From 3b8eb3d7543a57cfc7b849a0fdb189c19b0537fd Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 19 Apr 2009 13:34:21 +0000 Subject: 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/ri/paths.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb index 6279723529..2bcf8615e5 100644 --- a/lib/rdoc/ri/paths.rb +++ b/lib/rdoc/ri/paths.rb @@ -28,13 +28,20 @@ module RDoc::RI::Paths 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 -- cgit v1.2.3