From 6f81566adc67c0919624bd21b13d390b624607ab Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 28 Sep 2020 19:37:16 +0530 Subject: [PATCH] Reduce allocations from hack in document_fragment --- lib/nokogiri/html/document_fragment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nokogiri/html/document_fragment.rb b/lib/nokogiri/html/document_fragment.rb index f2375a3ce1..166ad985e2 100644 --- a/lib/nokogiri/html/document_fragment.rb +++ b/lib/nokogiri/html/document_fragment.rb @@ -33,7 +33,7 @@ def initialize document, tags = nil, ctx = nil self.errors = document.errors - preexisting_errors else # This is a horrible hack, but I don't care - if tags.strip =~ /^