diff options
author | Kouhei Sutou <kou@clear-code.com> | 2019-05-25 17:58:49 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-04 11:55:43 +0900 |
commit | 643344dc9460626617c9ce88f07b3ae0fed49150 (patch) | |
tree | f8fd1055293a32a7568467fd7c86af34412f8918 /lib/rexml/functions.rb | |
parent | 5f78b138b10a6732676689f0f8690c1db16c1355 (diff) | |
download | ruby-643344dc9460626617c9ce88f07b3ae0fed49150.tar.gz |
[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/functions.rb')
-rw-r--r-- | lib/rexml/functions.rb | 5 |
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 ) |