Use require vs require_relative

See ruby-ll commit b27fe7cc109a39184ac984405a1e452868f3fac9 for a more
in-depth explanation of this.
This commit is contained in:
Yorick Peterse 2015-06-03 06:42:30 +02:00
parent d2523a1082
commit 4bfeea2590
3 changed files with 39 additions and 37 deletions

View File

@ -1,3 +1,4 @@
require 'bundler/setup'
require 'stringio' require 'stringio'
require 'benchmark' require 'benchmark'
require 'benchmark/ips' require 'benchmark/ips'

View File

@ -3,19 +3,19 @@ require 'set'
require 'stringio' require 'stringio'
require 'thread' require 'thread'
require_relative 'oga/version' require 'oga/version'
require_relative 'oga/oga' require 'oga/oga'
require_relative 'oga/lru' require 'oga/lru'
require_relative 'oga/entity_decoder' require 'oga/entity_decoder'
require_relative 'oga/blacklist' require 'oga/blacklist'
require_relative 'oga/whitelist' require 'oga/whitelist'
# Load these first so that the native extensions don't have to define the # Load these first so that the native extensions don't have to define the
# Oga::XML namespace. # Oga::XML namespace.
require_relative 'oga/xml/lexer' require 'oga/xml/lexer'
require_relative 'oga/xml/parser' require 'oga/xml/parser'
require_relative 'liboga' require 'liboga'
#:nocov: #:nocov:
if RUBY_PLATFORM == 'java' if RUBY_PLATFORM == 'java'
@ -23,35 +23,35 @@ if RUBY_PLATFORM == 'java'
end end
#:nocov: #:nocov:
require_relative 'oga/xml/html_void_elements' require 'oga/xml/html_void_elements'
require_relative 'oga/xml/entities' require 'oga/xml/entities'
require_relative 'oga/xml/querying' require 'oga/xml/querying'
require_relative 'oga/xml/traversal' require 'oga/xml/traversal'
require_relative 'oga/xml/node' require 'oga/xml/node'
require_relative 'oga/xml/document' require 'oga/xml/document'
require_relative 'oga/xml/character_node' require 'oga/xml/character_node'
require_relative 'oga/xml/text' require 'oga/xml/text'
require_relative 'oga/xml/comment' require 'oga/xml/comment'
require_relative 'oga/xml/cdata' require 'oga/xml/cdata'
require_relative 'oga/xml/xml_declaration' require 'oga/xml/xml_declaration'
require_relative 'oga/xml/processing_instruction' require 'oga/xml/processing_instruction'
require_relative 'oga/xml/doctype' require 'oga/xml/doctype'
require_relative 'oga/xml/namespace' require 'oga/xml/namespace'
require_relative 'oga/xml/default_namespace' require 'oga/xml/default_namespace'
require_relative 'oga/xml/attribute' require 'oga/xml/attribute'
require_relative 'oga/xml/element' require 'oga/xml/element'
require_relative 'oga/xml/node_set' require 'oga/xml/node_set'
require_relative 'oga/xml/sax_parser' require 'oga/xml/sax_parser'
require_relative 'oga/xml/pull_parser' require 'oga/xml/pull_parser'
require_relative 'oga/html/parser' require 'oga/html/parser'
require_relative 'oga/html/sax_parser' require 'oga/html/sax_parser'
require_relative 'oga/html/entities' require 'oga/html/entities'
require_relative 'oga/xpath/lexer' require 'oga/xpath/lexer'
require_relative 'oga/xpath/parser' require 'oga/xpath/parser'
require_relative 'oga/xpath/evaluator' require 'oga/xpath/evaluator'
require_relative 'oga/css/lexer' require 'oga/css/lexer'
require_relative 'oga/css/parser' require 'oga/css/parser'

View File

@ -1,3 +1,4 @@
require 'bundler/setup'
require 'timeout' require 'timeout'
require 'stringio' require 'stringio'