diff --git a/lib/rdoc/top_level.rb b/lib/rdoc/top_level.rb index 6186722772..b8d4506ec8 100644 --- a/lib/rdoc/top_level.rb +++ b/lib/rdoc/top_level.rb @@ -272,7 +272,7 @@ def search_record # Is this TopLevel from a text file instead of a source code file? def text? - @parser and @parser.ancestors.include? RDoc::Parser::Text + @parser and @parser.include? RDoc::Parser::Text end def to_s # :nodoc: