From 643344dc9460626617c9ce88f07b3ae0fed49150 Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Sat, 25 May 2019 17:58:49 +0900 Subject: [ruby/rexml] xpath local_name: fix a bug that nil is returned for nonexistent case It must be an empty string. https://github.com/ruby/rexml/commit/81bc7cd4f5 --- lib/rexml/functions.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/rexml') diff --git a/lib/rexml/functions.rb b/lib/rexml/functions.rb index 4b46b8e678..a0f4823ada 100644 --- a/lib/rexml/functions.rb +++ b/lib/rexml/functions.rb @@ -67,10 +67,11 @@ module REXML end # UNTESTED - def Functions::local_name( node_set=nil ) - get_namespace( node_set ) do |node| + def Functions::local_name(node_set=nil) + get_namespace(node_set) do |node| return node.local_name end + "" end def Functions::namespace_uri( node_set=nil ) -- cgit v1.2.3