summaryrefslogtreecommitdiff
path: root/lib/rexml
diff options
context:
space:
mode:
authorKouhei Sutou <kou@clear-code.com>2019-05-25 17:58:49 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-04 11:55:43 +0900
commit643344dc9460626617c9ce88f07b3ae0fed49150 (patch)
treef8fd1055293a32a7568467fd7c86af34412f8918 /lib/rexml
parent5f78b138b10a6732676689f0f8690c1db16c1355 (diff)
[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
Diffstat (limited to 'lib/rexml')
-rw-r--r--lib/rexml/functions.rb5
1 files changed, 3 insertions, 2 deletions
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 )