diff options
Diffstat (limited to 'lib/rexml/functions.rb')
-rw-r--r-- | lib/rexml/functions.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/rexml/functions.rb b/lib/rexml/functions.rb index d2d078640b..d64ba7e378 100644 --- a/lib/rexml/functions.rb +++ b/lib/rexml/functions.rb @@ -27,7 +27,13 @@ module REXML def Functions::namespace_context; @@namespace_context; end def Functions::text( ) - return true if @@node.node_type == :text + if @@node.node_type == :element + return @@node.text + elsif @@node.node_type == :text + return @@node.value + else + return false + end end def Functions::last( ) |