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
|
while path_stack[0] == :predicate
|
||||||
path_stack.shift # :predicate
|
path_stack.shift # :predicate
|
||||||
predicate_expression = path_stack.shift.dclone
|
predicate_expression = path_stack.shift.dclone
|
||||||
nodesets = predicate(predicate_expression, nodesets)
|
nodesets = evaluate_predicate(predicate_expression, nodesets)
|
||||||
end
|
end
|
||||||
if nodesets.size == 1
|
if nodesets.size == 1
|
||||||
ordered_nodeset = nodesets[0]
|
ordered_nodeset = nodesets[0]
|
||||||
|
@ -578,7 +578,7 @@ module REXML
|
||||||
new_nodeset
|
new_nodeset
|
||||||
end
|
end
|
||||||
|
|
||||||
def predicate(expression, nodesets)
|
def evaluate_predicate(expression, nodesets)
|
||||||
# enter(:predicate, expression, nodesets)
|
# enter(:predicate, expression, nodesets)
|
||||||
new_nodesets = nodesets.collect do |nodeset|
|
new_nodesets = nodesets.collect do |nodeset|
|
||||||
new_nodeset = []
|
new_nodeset = []
|
||||||
|
@ -612,6 +612,7 @@ module REXML
|
||||||
end
|
end
|
||||||
new_nodeset
|
new_nodeset
|
||||||
end
|
end
|
||||||
|
new_nodesets
|
||||||
# ensure
|
# ensure
|
||||||
# leave(:predicate, new_nodesets)
|
# leave(:predicate, new_nodesets)
|
||||||
end
|
end
|
||||||
|
@ -731,7 +732,6 @@ module REXML
|
||||||
|
|
||||||
def following(node)
|
def following(node)
|
||||||
followings = []
|
followings = []
|
||||||
position = 1
|
|
||||||
following_node = next_sibling_node(node)
|
following_node = next_sibling_node(node)
|
||||||
while following_node
|
while following_node
|
||||||
followings << XPathNode.new(following_node,
|
followings << XPathNode.new(following_node,
|
||||||
|
@ -768,8 +768,8 @@ module REXML
|
||||||
# trace(:child, node_type, node)
|
# trace(:child, node_type, node)
|
||||||
case node_type
|
case node_type
|
||||||
when :element
|
when :element
|
||||||
nodesets << raw_node.children.collect.with_index do |node, i|
|
nodesets << raw_node.children.collect.with_index do |child_node, i|
|
||||||
XPathNode.new(node, position: i + 1)
|
XPathNode.new(child_node, position: i + 1)
|
||||||
end
|
end
|
||||||
when :document
|
when :document
|
||||||
new_nodeset = []
|
new_nodeset = []
|
||||||
|
|
Loading…
Reference in a new issue