From 862efcd6a87882642dc2d3f8bfa910d3b5e00b82 Mon Sep 17 00:00:00 2001 From: ser Date: Fri, 2 Apr 2004 03:57:03 +0000 Subject: REXML changes * The main purpose for this change is to get a fix in for nasty bug in XPath. In the new code for the descendant-or-self axis, the document order code was calling the wrong method to do node comparisons, causing a terrible overhead that slowed the axis down to the point where it was unusable. This is a common axis, also known as '//', so this fix is critical. * Using Element#text= on a non-Text, non-String argument caused an error. this has been changed so that the behavior is like puts() -- to_s() is called on the object first. * refactored the pretty-printing code a little. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rexml/xpath_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rexml/xpath_parser.rb') diff --git a/lib/rexml/xpath_parser.rb b/lib/rexml/xpath_parser.rb index 377a51e88..d58e75ebd 100644 --- a/lib/rexml/xpath_parser.rb +++ b/lib/rexml/xpath_parser.rb @@ -321,7 +321,7 @@ module REXML node_idx = [] np = node.node_type == :attribute ? node.element : node while np.parent and np.parent.node_type == :element - node_idx << np.parent.children.index( np ) + node_idx << np.parent.index( np ) np = np.parent end new_arry << [ node_idx.reverse.join, node ] -- cgit