From f53fe4ed7cbc6d43a1e5966ba6a92e93525258ee Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 25 Apr 2014 00:15:11 +0200 Subject: [PATCH] Reset the lexer when resetting the parser. Also removed the unused @lines instance variable. --- lib/oga/xml/parser.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/oga/xml/parser.y b/lib/oga/xml/parser.y index d56ac1e..d910424 100644 --- a/lib/oga/xml/parser.y +++ b/lib/oga/xml/parser.y @@ -182,8 +182,9 @@ end # Resets the internal state of the parser. # def reset - @lines = [] - @line = 1 + @line = 1 + + @lexer.reset end ##