summaryrefslogtreecommitdiffstats
path: root/lib/rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/ri/ri_driver.rb9
-rw-r--r--lib/rdoc/ri/ri_options.rb10
-rw-r--r--lib/rdoc/usage.rb6
3 files changed, 17 insertions, 8 deletions
diff --git a/lib/rdoc/ri/ri_driver.rb b/lib/rdoc/ri/ri_driver.rb
index afefa67dc..35c20a7a1 100644
--- a/lib/rdoc/ri/ri_driver.rb
+++ b/lib/rdoc/ri/ri_driver.rb
@@ -12,7 +12,14 @@ class RiDriver
def initialize
@options = RI::Options.instance
- @options.parse
+
+ args = ARGV
+ if ENV["RI"]
+ args = ENV["RI"].split.concat(ARGV)
+ end
+
+ @options.parse(args)
+
paths = @options.paths || RI::Paths::PATH
if paths.empty?
$stderr.puts "No ri documentation found in:"
diff --git a/lib/rdoc/ri/ri_options.rb b/lib/rdoc/ri/ri_options.rb
index b53a68812..ba420344f 100644
--- a/lib/rdoc/ri/ri_options.rb
+++ b/lib/rdoc/ri/ri_options.rb
@@ -187,12 +187,14 @@ module RI
# Parse command line options.
- def parse
+ def parse(args)
old_argv = ARGV.dup
- if ENV["RI"]
- ARGV.replace(ENV["RI"].split.concat(ARGV))
- end
+# if ENV["RI"]
+# ARGV.replace(ENV["RI"].split.concat(ARGV))
+# end
+
+ ARGV.replace(args)
begin
diff --git a/lib/rdoc/usage.rb b/lib/rdoc/usage.rb
index afc9006ba..73821dfae 100644
--- a/lib/rdoc/usage.rb
+++ b/lib/rdoc/usage.rb
@@ -115,10 +115,10 @@ module RDoc
end
options = RI::Options.instance
- if ENV["RI"]
- options.parse
+ if args = ENV["RI"]
+ options.parse(args.split)
end
- formatter = options.formatter.new(options, " ")
+ formatter = options.formatter.new(options, "")
formatter.display_flow(flow)
end