From 52ee303a3656e798f8a5a47a97a80640c9eb15ba Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Thu, 18 Oct 2018 09:41:53 -0400 Subject: [PATCH] s/block.call/yield --- lib/liquid/parse_tree_visitor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/liquid/parse_tree_visitor.rb b/lib/liquid/parse_tree_visitor.rb index 62f6c7b..74f5563 100644 --- a/lib/liquid/parse_tree_visitor.rb +++ b/lib/liquid/parse_tree_visitor.rb @@ -17,8 +17,8 @@ module Liquid def add_callback_for(*classes, &block) callback = block - callback = ->(node, _) { block.call(node) } if block.arity.abs == 1 - callback = ->(_, _) { block.call } if block.arity.zero? + callback = ->(node, _) { yield node } if block.arity.abs == 1 + callback = ->(_, _) { yield } if block.arity.zero? classes.each { |klass| @callbacks[klass] = callback } self end