зеркало из https://github.com/github/ruby.git
[ruby/rdoc] Prefer require_relative
This commit is contained in:
Родитель
12a2e32d43
Коммит
867f0c6793
|
@ -4,7 +4,7 @@
|
|||
require 'erb'
|
||||
require 'fileutils'
|
||||
require 'pathname'
|
||||
require 'rdoc/generator/markup'
|
||||
require_relative 'markup'
|
||||
|
||||
##
|
||||
# Darkfish RDoc HTML Generator
|
||||
|
|
|
@ -91,8 +91,8 @@ class RDoc::Generator::POT
|
|||
extractor.extract
|
||||
end
|
||||
|
||||
require 'rdoc/generator/pot/message_extractor'
|
||||
require 'rdoc/generator/pot/po'
|
||||
require 'rdoc/generator/pot/po_entry'
|
||||
require_relative 'pot/message_extractor'
|
||||
require_relative 'pot/po'
|
||||
require_relative 'pot/po_entry'
|
||||
|
||||
end
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
module RDoc::I18n
|
||||
|
||||
autoload :Locale, 'rdoc/i18n/locale'
|
||||
require 'rdoc/i18n/text'
|
||||
require_relative 'i18n/text'
|
||||
|
||||
end
|
||||
|
|
|
@ -269,9 +269,9 @@ class RDoc::Parser
|
|||
end
|
||||
|
||||
# simple must come first in order to show up last in the parsers list
|
||||
require 'rdoc/parser/simple'
|
||||
require 'rdoc/parser/c'
|
||||
require 'rdoc/parser/changelog'
|
||||
require 'rdoc/parser/markdown'
|
||||
require 'rdoc/parser/rd'
|
||||
require 'rdoc/parser/ruby'
|
||||
require_relative 'parser/simple'
|
||||
require_relative 'parser/c'
|
||||
require_relative 'parser/changelog'
|
||||
require_relative 'parser/markdown'
|
||||
require_relative 'parser/rd'
|
||||
require_relative 'parser/ruby'
|
||||
|
|
|
@ -561,6 +561,6 @@ rescue LoadError
|
|||
end
|
||||
|
||||
# require built-in generators after discovery in case they've been replaced
|
||||
require 'rdoc/generator/darkfish'
|
||||
require 'rdoc/generator/ri'
|
||||
require 'rdoc/generator/pot'
|
||||
require_relative 'generator/darkfish'
|
||||
require_relative 'generator/ri'
|
||||
require_relative 'generator/pot'
|
||||
|
|
|
@ -17,7 +17,7 @@ require 'rdoc'
|
|||
##
|
||||
# For RubyGems backwards compatibility
|
||||
|
||||
require 'rdoc/ri/formatter'
|
||||
require_relative 'formatter'
|
||||
|
||||
##
|
||||
# The RI driver implements the command-line ri tool.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rdoc/rdoc'
|
||||
require_relative '../rdoc'
|
||||
|
||||
##
|
||||
# The directories where ri data lives. Paths can be enumerated via ::each, or
|
||||
|
|
|
@ -4,7 +4,7 @@ begin
|
|||
rescue Gem::LoadError
|
||||
end unless defined?(RDoc)
|
||||
|
||||
require 'rdoc/task'
|
||||
require_relative '../task'
|
||||
|
||||
##
|
||||
# RDoc::RI::Task creates ri data in <code>./.rdoc</code> for your project.
|
||||
|
|
|
@ -70,7 +70,7 @@ class RDoc::RubygemsHook
|
|||
def self.load_rdoc
|
||||
return if @rdoc_version
|
||||
|
||||
require 'rdoc/rdoc'
|
||||
require_relative 'rdoc'
|
||||
|
||||
@rdoc_version = Gem::Version.new ::RDoc::VERSION
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче