Index: ext/hpricot_scan/hpricot_scan.java.rl
===================================================================
--- ext/hpricot_scan/hpricot_scan.java.rl (revision 161)
+++ ext/hpricot_scan/hpricot_scan.java.rl (working copy)
@@ -259,7 +259,11 @@
/* We've used up the entire buffer storing an already-parsed token
* prefix that must be preserved. Likely caused by super-long attributes.
* See ticket #13. */
- rb_raise(rb_eHpricotParseError, "ran out of buffer space on element <" + tag.toString() + ">, starting on line "+curline+".");
+ buffer_size += BUFSIZE;
+ char[] new_buf = new char[buffer_size];
+ System.arraycopy(buf, 0, new_buf, 0, buf.length);
+ buf = new_buf;
+ space = buffer_size - have;
}
if (port.respondsTo("read")) {