Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions lib/rdoc/ri/paths.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,12 @@ module RDoc::RI::Paths

version = RbConfig::CONFIG['ruby_version']

BASE = if RbConfig::CONFIG.key? 'ridir' then
File.join RbConfig::CONFIG['ridir'], version
else
File.join RbConfig::CONFIG['datadir'], 'ri', version
end
BASE = File.join RbConfig::CONFIG['ridir'], version

homedir = begin
File.expand_path('~')
HOMEDIR = begin
File.expand_path('~/.rdoc')
rescue ArgumentError
end

homedir ||= ENV['HOME'] ||
ENV['USERPROFILE'] || ENV['HOMEPATH'] # for 1.8 compatibility

HOMEDIR = if homedir then
File.join homedir, ".rdoc"
end
#:startdoc:

##
Expand Down