summaryrefslogtreecommitdiff
path: root/lib/rdoc/ri/ri_paths.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/ri/ri_paths.rb')
-rw-r--r--lib/rdoc/ri/ri_paths.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/rdoc/ri/ri_paths.rb b/lib/rdoc/ri/ri_paths.rb
index 14288d9..ff8257a 100644
--- a/lib/rdoc/ri/ri_paths.rb
+++ b/lib/rdoc/ri/ri_paths.rb
@@ -15,8 +15,8 @@ module RI
#
# There's contention about all this, but for now:
#
- # system:: $prefix/lib/ruby/<version>/doc/rdoc
- # site:: $prefix/lib/ruby/site_dir/<version>/doc/rdoc
+ # system:: $datadir/ri/<ver>/system/...
+ # site:: $datadir/ri/<ver>/site/...
# user:: ~/.rdoc
module Paths
@@ -26,8 +26,11 @@ module RI
DOC_DIR = "doc/rdoc"
- SYSDIR = File.join(Config::CONFIG['rubylibdir'], DOC_DIR)
- SITEDIR = File.join(Config::CONFIG['sitelibdir'], DOC_DIR)
+ version = Config::CONFIG['ruby_version']
+
+ base = File.join(Config::CONFIG['datadir'], "ri", version)
+ SYSDIR = File.join(base, "system")
+ SITEDIR = File.join(base, "site")
homedir = ENV['HOME'] || ENV['USERPROFILE'] || ENV['HOMEPATH']
if homedir
@@ -36,6 +39,7 @@ module RI
HOMEDIR = nil
end
+ # This is the search path for 'ri'
PATH = [ SYSDIR, SITEDIR, HOMEDIR ].find_all {|p| p && File.directory?(p)}
end
end