提交 def815a4 编写于 作者: A Aaron Patterson

halting lambda must be instance execed

上级 dbee8c32
......@@ -131,7 +131,7 @@ def self.halting_and_conditional(next_callback, user_callback, user_conditions,
if !halted && user_conditions.all? { |c| c.call(target, value) }
result = user_callback.call target, value
env.halted = halted_lambda.call result
env.halted = target.instance_exec result, &halted_lambda
if env.halted
target.send :halted_callback_hook, filter
end
......@@ -148,7 +148,7 @@ def self.halting(next_callback, user_callback, halted_lambda, filter)
if !halted
result = user_callback.call target, value
env.halted = halted_lambda.call result
env.halted = target.instance_exec result, &halted_lambda
if env.halted
target.send :halted_callback_hook, filter
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册