# File lib/html5/html5parser/phase.rb, line 86 def process_eof @tree.generateImpliedEndTags if @tree.open_elements.length > 2 parse_error("expected-closing-tag-but-got-eof") elsif @tree.open_elements.length == 2 and @tree.open_elements[1].name != 'body' # This happens for framesets or something? parse_error("expected-closing-tag-but-got-eof") elsif @parser.inner_html and @tree.open_elements.length > 1 # XXX This is not what the specification says. Not sure what to do here. parse_error("eof-in-innerhtml") end # Betting ends. end