mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rexml: Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f5db4a0cc2
commit
766ee6e550
1 changed files with 5 additions and 5 deletions
|
@ -434,7 +434,7 @@ module REXML
|
|||
while path_stack[0] == :predicate
|
||||
path_stack.shift # :predicate
|
||||
predicate_expression = path_stack.shift.dclone
|
||||
nodesets = predicate(predicate_expression, nodesets)
|
||||
nodesets = evaluate_predicate(predicate_expression, nodesets)
|
||||
end
|
||||
if nodesets.size == 1
|
||||
ordered_nodeset = nodesets[0]
|
||||
|
@ -578,7 +578,7 @@ module REXML
|
|||
new_nodeset
|
||||
end
|
||||
|
||||
def predicate(expression, nodesets)
|
||||
def evaluate_predicate(expression, nodesets)
|
||||
# enter(:predicate, expression, nodesets)
|
||||
new_nodesets = nodesets.collect do |nodeset|
|
||||
new_nodeset = []
|
||||
|
@ -612,6 +612,7 @@ module REXML
|
|||
end
|
||||
new_nodeset
|
||||
end
|
||||
new_nodesets
|
||||
# ensure
|
||||
# leave(:predicate, new_nodesets)
|
||||
end
|
||||
|
@ -731,7 +732,6 @@ module REXML
|
|||
|
||||
def following(node)
|
||||
followings = []
|
||||
position = 1
|
||||
following_node = next_sibling_node(node)
|
||||
while following_node
|
||||
followings << XPathNode.new(following_node,
|
||||
|
@ -768,8 +768,8 @@ module REXML
|
|||
# trace(:child, node_type, node)
|
||||
case node_type
|
||||
when :element
|
||||
nodesets << raw_node.children.collect.with_index do |node, i|
|
||||
XPathNode.new(node, position: i + 1)
|
||||
nodesets << raw_node.children.collect.with_index do |child_node, i|
|
||||
XPathNode.new(child_node, position: i + 1)
|
||||
end
|
||||
when :document
|
||||
new_nodeset = []
|
||||
|
|
Loading…
Reference in a new issue