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
This commit is contained in:
yugui 2009-04-19 13:34:21 +00:00
parent 8001673452
commit 3b8eb3d754
2 changed files with 14 additions and 2 deletions

View file

@ -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> Mon Mar 23 21:41:14 2009 Akinori MUSHA <knu@iDaemons.org>
* ext/dbm/dbm.c (fdbm_initialize): Make the file variable * ext/dbm/dbm.c (fdbm_initialize): Make the file variable

View file

@ -28,13 +28,20 @@ module RDoc::RI::Paths
VERSION = RbConfig::CONFIG['ruby_version'] 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") SYSDIR = File.join(base, "system")
SITEDIR = File.join(base, "site") SITEDIR = File.join(base, "site")
homedir = ENV['HOME'] || ENV['USERPROFILE'] || ENV['HOMEPATH'] homedir = ENV['HOME'] || ENV['USERPROFILE'] || ENV['HOMEPATH']
if homedir then if homedir then
HOMEDIR = File.join(homedir, ".rdoc") HOMEDIR = File.join(homedir, ".#{rdoc}")
else else
HOMEDIR = nil HOMEDIR = nil
end end