Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/querly/pattern/expr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,13 @@ def test_name(node)
end

def test_node(node)
return false unless node
return false if block == true && node.type != :block
return false if block == false && node.type == :block

node = node.children.first if node&.type == :block
node = node.children.first if node.type == :block

case node&.type
case node.type
when :send, :csend
return false unless test_name(node)
return false unless test_receiver(node.children[0])
Expand Down