From 5fbd82e4bb960675404e58d51b1c63f45d2be036 Mon Sep 17 00:00:00 2001 From: Ivan Navarrete and Jonas Nicklas Date: Fri, 15 Mar 2013 18:41:56 +0100 Subject: [PATCH] avoid autoload, for thread safety --- lib/xpath.rb | 13 +++++++------ lib/xpath/html.rb | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/xpath.rb b/lib/xpath.rb index ef4d062..d4c7a2f 100644 --- a/lib/xpath.rb +++ b/lib/xpath.rb @@ -1,12 +1,13 @@ require 'nokogiri' +require 'xpath/dsl' +require 'xpath/expression' +require 'xpath/literal' +require 'xpath/union' +require 'xpath/renderer' +require 'xpath/html' + module XPath - autoload :Expression, 'xpath/expression' - autoload :Literal, 'xpath/literal' - autoload :Union, 'xpath/union' - autoload :Renderer, 'xpath/renderer' - autoload :HTML, 'xpath/html' - autoload :DSL, 'xpath/dsl' extend XPath::DSL::TopLevel include XPath::DSL::TopLevel diff --git a/lib/xpath/html.rb b/lib/xpath/html.rb index bce5b99..7feeb2a 100644 --- a/lib/xpath/html.rb +++ b/lib/xpath/html.rb @@ -1,6 +1,6 @@ module XPath module HTML - include XPath + include XPath::DSL::TopLevel extend self # Match an `a` link element.