vondruch / rpms / ruby

Forked from rpms/ruby 6 years ago
Clone
bbad66e
--- ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb.gemmulti	2007-02-13 08:01:19.000000000 +0900
abf129c
+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb	2009-10-14 23:51:09.000000000 +0900
bbad66e
@@ -63,7 +63,7 @@
bbad66e
 
bbad66e
         [ "--gems",         nil,    nil,
bbad66e
           "Include documentation from Rubygems:\n  " +
bbad66e
-          (RI::Paths::GEMDIRS ? "#{Gem.path}/doc/*/ri" :
abf129c
+          (RI::Paths::GEMDIRS ? Gem.path.map {|path| "#{path}/doc/*/ri" }.join(', ') :
bbad66e
                                 "No Rubygems ri found.") ],
bbad66e
                                                            
bbad66e
         [ "--format",       "-f",   "<name>",
bbad66e
@@ -136,7 +136,11 @@
bbad66e
           RI::Paths::HOMEDIR
bbad66e
         ]
bbad66e
 
bbad66e
-        directories << "#{Gem.path}/doc/*/ri" if RI::Paths::GEMDIRS
bbad66e
+        if RI::Paths::GEMDIRS
bbad66e
+          Gem.path.each {|gempath|
bbad66e
+            directories << "#{gempath}/doc/*/ri"
bbad66e
+          }
bbad66e
+        end
bbad66e
 
bbad66e
         directories = directories.join("\n    ")
bbad66e
 
bbad66e
--- ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb.gemmulti	2007-02-13 08:01:19.000000000 +0900
abf129c
+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb	2009-10-15 00:02:05.000000000 +0900
abf129c
@@ -44,7 +44,7 @@
bbad66e
 
bbad66e
     begin
abf129c
       require 'rubygems'
bbad66e
-      GEMDIRS = Dir["#{Gem.path}/doc/*/ri"]
abf129c
+      GEMDIRS = Gem.path.map {|path| Dir["#{path}/doc/*/ri"]}.flatten
abf129c
       GEMDIRS.each { |path| RI::Paths::PATH << path }
bbad66e
     rescue LoadError
bbad66e
       GEMDIRS = nil