From fc38b39aa36f49fc38afd44c7e23ac3bfc6159e7 Mon Sep 17 00:00:00 2001 From: Dan Fockler Date: Sat, 15 Aug 2015 06:34:09 -0700 Subject: [PATCH] make string comparison a bit faster --- lib/oga/xpath/evaluator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oga/xpath/evaluator.rb b/lib/oga/xpath/evaluator.rb index 07cd721..8b1c72a 100644 --- a/lib/oga/xpath/evaluator.rb +++ b/lib/oga/xpath/evaluator.rb @@ -1693,7 +1693,7 @@ module Oga return true if name == STAR - xml_node.name == name || xml_node.name.downcase == name.downcase + xml_node.name == name || xml_node.name.casecmp(name).zero? end ##