Fixing require statement for Nokogiri on JRuby

This commit is contained in:
Bryan Helmkamp 2008-12-29 00:36:53 -05:00
parent 6d5205b7b7
commit 3d522a476a

View File

@ -12,13 +12,14 @@ module Webrat
def self.require_xml def self.require_xml
gem "nokogiri", ">= 1.1.0" gem "nokogiri", ">= 1.1.0"
# We need Nokogiri's CSS to XPath support, even if using
# REXML and Hpricot for parsing and searching
require "nokogiri"
if on_java? if on_java?
# We need Nokogiri's CSS to XPath support, even if using REXML and Hpricot for parsing and searching
require "nokogiri/css"
require "hpricot" require "hpricot"
require "rexml/document" require "rexml/document"
else else
require "nokogiri"
require "webrat/core/nokogiri" require "webrat/core/nokogiri"
end end
end end