From 4ea25eba02d85b81dcee4302375d7d3e08cd52ac Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 30 Aug 2009 16:40:22 +0200 Subject: utils: try nokogiri/hpricot if hpricot is not available --- lib/rbot/core/utils/utils.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/rbot') diff --git a/lib/rbot/core/utils/utils.rb b/lib/rbot/core/utils/utils.rb index fb9b1f65..86254b14 100644 --- a/lib/rbot/core/utils/utils.rb +++ b/lib/rbot/core/utils/utils.rb @@ -102,7 +102,12 @@ rescue LoadError end begin - require 'hpricot' + begin + require 'hpricot' + rescue LoadError + require 'nokogiri/hpricot' + ::Hpricot = Nokogiri::Hpricot + end module ::Irc module Utils AFTER_PAR_PATH = /^(?:div|span)$/ -- cgit v1.2.3