diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-08-30 16:40:22 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-08-30 16:40:22 +0200 |
commit | 4ea25eba02d85b81dcee4302375d7d3e08cd52ac (patch) | |
tree | 0390ee2dd00ecc300b3531be942aa7060c787c31 /lib/rbot | |
parent | e63551c50a03a70d32455697112ee72c6006dd19 (diff) |
utils: try nokogiri/hpricot if hpricot is not available
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/core/utils/utils.rb | 7 |
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)$/ |