diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-19 13:34:21 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-19 13:34:21 +0000 |
commit | 3b8eb3d7543a57cfc7b849a0fdb189c19b0537fd (patch) | |
tree | 76c8accb89b00ae7bba20d2753e9d58a5392370f | |
parent | 80016734521554c9888630b4ca5b6e55e91701c6 (diff) |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/rdoc/ri/paths.rb | 11 |
2 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Thu Mar 26 11:33:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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@iDaemons.org> * ext/dbm/dbm.c (fdbm_initialize): Make the file variable 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 |