diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-28 22:08:56 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-28 22:08:56 +0000 |
commit | e2efe8e81dc7e9fce40b024df6a20bbf4b830350 (patch) | |
tree | 942e66e071e759c7db670a42daeac26c7437f25b /lib/rdoc/ri | |
parent | 90d5bcf9104fe58887cf705b718a9c7b537b51a5 (diff) | |
download | ruby-e2efe8e81dc7e9fce40b024df6a20bbf4b830350.tar.gz |
Import RDoc 3.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/ri')
-rw-r--r-- | lib/rdoc/ri/driver.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/ri/paths.rb | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb index 9d61b1f243..112d65399c 100644 --- a/lib/rdoc/ri/driver.rb +++ b/lib/rdoc/ri/driver.rb @@ -610,7 +610,7 @@ Options may also be set in the 'RI' environment variable. end if class_methods or instance_methods or not klass.constants.empty? then - out << RDoc::Markup::Rule.new + out << RDoc::Markup::Rule.new(1) end unless klass.constants.empty? then diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb index f44b0e1e95..a3c65bf928 100644 --- a/lib/rdoc/ri/paths.rb +++ b/lib/rdoc/ri/paths.rb @@ -19,7 +19,17 @@ module RDoc::RI::Paths SYSDIR = File.join base, "system" SITEDIR = File.join base, "site" - HOMEDIR = File.expand_path('~/.rdoc') rescue nil + homedir = begin + File.expand_path('~') + rescue ArgumentError + end + + homedir ||= ENV['HOME'] || + ENV['USERPROFILE'] || ENV['HOMEPATH'] # for 1.8 compatibility + + HOMEDIR = if homedir then + File.join homedir, ".rdoc" + end #:startdoc: @gemdirs = nil |