diff options
-rw-r--r-- | lib/rexml/functions.rb | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -67,11 +67,10 @@ module REXML if node_set == nil yield @@context[:node] if defined? @@context[:node].namespace else - if node_set.namespace - yield node_set - else - return unless node_set.kind_of? Enumerable node_set.each { |node| yield node if defined? node.namespace } end end end @@ -157,12 +156,9 @@ module REXML # Kouhei fixed this too def Functions::substring_after( string, test ) ruby_string = string(string) - ruby_index = ruby_string.index(string(test)) - if ruby_index.nil? - "" - else - ruby_string[ ruby_index+1..-1 ] - end end # Take equal portions of Mike Stok and Sean Russell; mix @@ -339,6 +335,8 @@ module REXML end def Functions::sum( nodes ) end def Functions::floor( number ) |