bbad66ed0a
528787)
56 lines
2.0 KiB
Diff
56 lines
2.0 KiB
Diff
--- ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb.gemmulti 2007-02-13 08:01:19.000000000 +0900
|
|
+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb 2009-10-14 01:08:42.000000000 +0900
|
|
@@ -63,7 +63,7 @@
|
|
|
|
[ "--gems", nil, nil,
|
|
"Include documentation from Rubygems:\n " +
|
|
- (RI::Paths::GEMDIRS ? "#{Gem.path}/doc/*/ri" :
|
|
+ (RI::Paths::GEMDIRS ? ( tmppath=""; Gem.path.each {|path| tmppath += "#{path}/doc/*/ri "}; tmppath) :
|
|
"No Rubygems ri found.") ],
|
|
|
|
[ "--format", "-f", "<name>",
|
|
@@ -136,7 +136,11 @@
|
|
RI::Paths::HOMEDIR
|
|
]
|
|
|
|
- directories << "#{Gem.path}/doc/*/ri" if RI::Paths::GEMDIRS
|
|
+ if RI::Paths::GEMDIRS
|
|
+ Gem.path.each {|gempath|
|
|
+ directories << "#{gempath}/doc/*/ri"
|
|
+ }
|
|
+ end
|
|
|
|
directories = directories.join("\n ")
|
|
|
|
--- ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb.gemmulti 2007-02-13 08:01:19.000000000 +0900
|
|
+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb 2009-10-13 19:58:07.000000000 +0900
|
|
@@ -43,9 +43,14 @@
|
|
PATH = [ SYSDIR, SITEDIR, HOMEDIR ].find_all {|p| p && File.directory?(p)}
|
|
|
|
begin
|
|
- require 'rubygems'
|
|
- GEMDIRS = Dir["#{Gem.path}/doc/*/ri"]
|
|
- GEMDIRS.each { |path| RI::Paths::PATH << path }
|
|
+ require 'rubygems'
|
|
+ gemdirs = []
|
|
+ Gem.path.each{ |gempath|
|
|
+ ripath = Dir["#{gempath}/doc/*/ri"]
|
|
+ ripath.each { |path| RI::Paths::PATH << path }
|
|
+ gemdirs << gempath
|
|
+ }
|
|
+ GEMDIRS = gemdirs
|
|
rescue LoadError
|
|
GEMDIRS = nil
|
|
end
|
|
@@ -71,7 +76,9 @@
|
|
path << RI::Paths::SYSDIR if use_system
|
|
path << RI::Paths::SITEDIR if use_site
|
|
path << RI::Paths::HOMEDIR if use_home
|
|
- path << RI::Paths::GEMDIRS if use_gems
|
|
+ if use_gems
|
|
+ RI::Paths::GEMDIRS.each {|gemdirs| path << gemdirs }
|
|
+ end
|
|
|
|
return path.flatten.compact
|
|
end
|