summaryrefslogtreecommitdiff
path: root/lib/rdoc/ri/ri_paths.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/ri/ri_paths.rb')
-rw-r--r--lib/rdoc/ri/ri_paths.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rdoc/ri/ri_paths.rb b/lib/rdoc/ri/ri_paths.rb
index c610b6e551..c5526201ea 100644
--- a/lib/rdoc/ri/ri_paths.rb
+++ b/lib/rdoc/ri/ri_paths.rb
@@ -41,5 +41,11 @@ module RI
# This is the search path for 'ri'
PATH = [ SYSDIR, SITEDIR, HOMEDIR ].find_all {|p| p && File.directory?(p)}
+
+ begin
+ require 'rubygems'
+ Dir["#{Gem.path}/doc/*/ri"].each { |path| RI::Paths::PATH << path }
+ rescue LoadError
+ end
end
end