diff --git a/lib/ruby_memcheck/test_task_reporter.rb b/lib/ruby_memcheck/test_task_reporter.rb index 3ee2192..a329a8c 100644 --- a/lib/ruby_memcheck/test_task_reporter.rb +++ b/lib/ruby_memcheck/test_task_reporter.rb @@ -31,7 +31,10 @@ def parse_valgrind_output(xml_files) @errors = [] xml_files.each do |file| - Nokogiri::XML::Reader(File.open(file)).each do |node| + reader = Nokogiri::XML::Reader(File.open(file)) do |config| + config.huge + end + reader.each do |node| next unless node.name == "error" && node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT error_xml = Nokogiri::XML::Document.parse(node.outer_xml).root