summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
authorÉtienne Barrié <etienne.barrie@gmail.com>2023-02-07 13:29:31 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-02-21 19:32:14 +0900
commitbc101f0fc1772e85ee074fe78a6b672dc5f175c5 (patch)
tree1a3792dc7669c0e1ba581ced9b9f964ced264094 /lib/rdoc
parent4c7726516c2b3b54cd0a78a214f005881fc68aba (diff)
downloadruby-bc101f0fc1772e85ee074fe78a6b672dc5f175c5.tar.gz
[ruby/rdoc] Fix RDoc::Parser::Ruby not being documented
The calls to require prevent the class from being documented. https://github.com/ruby/rdoc/commit/76283fc42e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/parser/ruby.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb
index b74ead65ab..0323e4de41 100644
--- a/lib/rdoc/parser/ruby.rb
+++ b/lib/rdoc/parser/ruby.rb
@@ -8,6 +8,9 @@
# by Keiju ISHITSUKA (Nippon Rational Inc.)
#
+require 'ripper'
+require_relative 'ripper_state_lex'
+
##
# Extracts code elements from a source file returning a TopLevel object
# containing the constituent file elements.
@@ -138,9 +141,6 @@
# Note that by default, the :method: directive will be ignored if there is a
# standard rdocable item following it.
-require 'ripper'
-require_relative 'ripper_state_lex'
-
class RDoc::Parser::Ruby < RDoc::Parser
parse_files_matching(/\.rbw?$/)