diff --git a/lib/rex/parser/nmap_xml.rb b/lib/rex/parser/nmap_xml.rb index 7cea308e86..bc28c6b50c 100644 --- a/lib/rex/parser/nmap_xml.rb +++ b/lib/rex/parser/nmap_xml.rb @@ -117,7 +117,7 @@ class NmapXMLStreamParser end end rescue NoMethodError => err - raise err if err.message != /NilClass/ + raise err unless err.message =~ /NilClass/ end end