summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-08-30 16:40:22 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-08-30 16:40:22 +0200
commit4ea25eba02d85b81dcee4302375d7d3e08cd52ac (patch)
tree0390ee2dd00ecc300b3531be942aa7060c787c31 /lib/rbot
parente63551c50a03a70d32455697112ee72c6006dd19 (diff)
utils: try nokogiri/hpricot if hpricot is not available
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/core/utils/utils.rb7
1 files changed, 6 insertions, 1 deletions
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)$/