]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Revert "utils: try nokogiri/hpricot if hpricot is not available"
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 30 Aug 2009 19:56:11 +0000 (21:56 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 30 Aug 2009 19:56:11 +0000 (21:56 +0200)
This reverts commit 4ea25eba02d85b81dcee4302375d7d3e08cd52ac.

Not only the patch was missing an essential part, but Nokogiri is not
compatible enough with Hpricot anyway. Incompatibilities include
doc/"style|script" raising an "Undefined namespace prefix" error and the
non-existence of Hpricot::Elements.

If we want to support Nokogiri we'll need to write code for it on
purpose or redesign the Hpricot code so that it only uses the subset
supported by Nokogiri.

lib/rbot/core/utils/utils.rb

index 86254b141c914a6fc21f341dcf51f841a89b32d8..fb9b1f651094f42fff7f42654348e80705b197ca 100644 (file)
@@ -102,12 +102,7 @@ rescue LoadError
 end
 
 begin
-  begin
-    require 'hpricot'
-  rescue LoadError
-    require 'nokogiri/hpricot'
-    ::Hpricot = Nokogiri::Hpricot
-  end
+  require 'hpricot'
   module ::Irc
     module Utils
       AFTER_PAR_PATH = /^(?:div|span)$/