mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rexml/xpath_parser.rb, test/rexml/test_xpath.rb:
add missing method availability check. [ruby-core:32447] Reported by Wiebe Cazemier. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7bf12316a1
commit
d8c3fa1506
3 changed files with 31 additions and 1 deletions
|
@ -434,7 +434,8 @@ module REXML
|
|||
when :and
|
||||
left = expr( path_stack.shift, nodeset.dup, context )
|
||||
#puts "LEFT => #{left.inspect} (#{left.class.name})"
|
||||
if left == false || left.nil? || !left.inject(false) {|a,b| a | b}
|
||||
return [] unless left
|
||||
if left.respond_to?(:inject) and !left.inject(false) {|a,b| a | b}
|
||||
return []
|
||||
end
|
||||
right = expr( path_stack.shift, nodeset.dup, context )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue