diff --git a/lib/oga/xml/parser.rll b/lib/oga/xml/parser.rll index 6e7870c..1e48560 100644 --- a/lib/oga/xml/parser.rll +++ b/lib/oga/xml/parser.rll @@ -262,6 +262,17 @@ string_body_follow yield [-1, -1] end + ## + # @see [LL::Driver#parse] + # + def parse + retval = super + + reset + + return retval + end + ## # @param [Array] children # @return [Oga::XML::Document] diff --git a/lib/oga/xml/pull_parser.rb b/lib/oga/xml/pull_parser.rb index c2242bd..ae78fcb 100644 --- a/lib/oga/xml/pull_parser.rb +++ b/lib/oga/xml/pull_parser.rb @@ -84,9 +84,7 @@ module Oga def parse(&block) @block = block - yyparse(self, :yield_next_token) - - reset + super return end