summaryrefslogtreecommitdiff
path: root/lib/rdoc/ri.rb
diff options
context:
space:
mode:
authorUlysse Buonomo <buonomo.ulysse@gmail.com>2022-02-10 03:31:06 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-02-12 15:06:06 +0900
commit5348a34504a67597e3a3ed98a3020dfd762241ad (patch)
tree7f9f69344798fa039d3f382974f92d26f3369aa3 /lib/rdoc/ri.rb
parent08137c5dd99354225874abc95280188738030794 (diff)
[ruby/rdoc] Relative loading for easier development (https://github.com/ruby/rdoc/pull/821)
This patch makes sure we only load relative code. Hence when coding or testing rdoc, we'll be sure to always be using the correct code. Discussion started at https://github.com/ruby/rdoc/pull/817. Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com> https://github.com/ruby/rdoc/commit/aa41bd48eb Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Diffstat (limited to 'lib/rdoc/ri.rb')
-rw-r--r--lib/rdoc/ri.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/rdoc/ri.rb b/lib/rdoc/ri.rb
index c798c1fc49..0af05f729f 100644
--- a/lib/rdoc/ri.rb
+++ b/lib/rdoc/ri.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'rdoc'
+require_relative '../rdoc'
##
# Namespace for the ri command line tool's implementation.
@@ -13,9 +13,8 @@ module RDoc::RI
class Error < RDoc::Error; end
- autoload :Driver, 'rdoc/ri/driver'
- autoload :Paths, 'rdoc/ri/paths'
- autoload :Store, 'rdoc/ri/store'
+ autoload :Driver, "#{__dir__}/ri/driver"
+ autoload :Paths, "#{__dir__}/ri/paths"
+ autoload :Store, "#{__dir__}/ri/store"
end
-