diff --git a/lib/rdoc/README b/lib/rdoc/README index 1b8671182f..0c10d0ea69 100644 --- a/lib/rdoc/README +++ b/lib/rdoc/README @@ -196,11 +196,12 @@ Options are: [--quiet] do not display progress messages -[--ri _and_ --ri-site] +[--ri, --ri-site, _and_ --ri-system] generate output than can be read by the _ri_ command-line tool. - By default --ri places its output in ~/.rdoc, and --ri-site in - $datadir/ri//site. Both can be overridden with a subsequent - --op option. Both default directories are in ri's default search + By default --ri places its output in ~/.rdoc, --ri-site in + $datadir/ri//site, and --ri-system in + $datadir/ri//system. All can be overridden with a subsequent + --op option. All default directories are in ri's default search path. [--show-hash] diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb index ab99c18b86..0d99a5438e 100644 --- a/lib/rdoc/options.rb +++ b/lib/rdoc/options.rb @@ -198,6 +198,12 @@ class Options "stored in a site-wide directory, making them accessible\n"+ "to others, so special privileges are needed." ], + [ "--ri-system", "-Y", nil, + "generate output for use by 'ri.' The files are\n" + + "stored in a system-level directory, making them accessible\n"+ + "to others, so special privileges are needed. This option\n"+ + "is intended to be used during Ruby installations" ], + [ "--show-hash", "-H", nil, "A name of the form #name in a comment\n" + "is a possible hyperlink to an instance\n" + @@ -431,9 +437,14 @@ class Options when "--include" @rdoc_include.concat arg.split(/\s*,\s*/) - when "--ri", "--ri-site" + when "--ri", "--ri-site", "--ri-system" @generator_name = "ri" - @op_dir = opt == "--ri" ? RI::Paths::HOMEDIR : RI::Paths::SITEDIR + @op_dir = case opt + when "--ri" then RI::Paths::HOMEDIR + when "--ri-site" then RI::Paths::SITEDIR + when "--ri-system" then RI::Paths::SYSDIR + else fail opt + end setup_generator(generators) when "--tab-width"