aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/ri
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/ri')
-rw-r--r--lib/rdoc/ri/driver.rb2
-rw-r--r--lib/rdoc/ri/paths.rb12
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