iterationlabs/ruby-readability — pull request #26 by jrust (2012-04-09 17:51:30+00:00)
Title: Empty string raises an exception

Nokogiri returns an empty document node for empty strings, but this breaks Readability. Obviously there's not much use in scoring an empty string, but our crawler came across some documents that had this issue so we needed to fix the exception. In summary, this works:

Readability::Document.new('a').content

This raises an exception:

Readability::Document.new('').content

The patch in this pull request fixes the issue.