mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 10:20:43 -07:00
Optimize checking for interrupts by replacing any? with NOT empty?
This commit is contained in:
@@ -73,7 +73,7 @@ module Liquid
|
|||||||
|
|
||||||
# are there any not handled interrupts?
|
# are there any not handled interrupts?
|
||||||
def has_interrupt?
|
def has_interrupt?
|
||||||
@interrupts.any?
|
!@interrupts.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
# push an interrupt to the stack. this interrupt is considered not handled.
|
# push an interrupt to the stack. this interrupt is considered not handled.
|
||||||
|
|||||||
Reference in New Issue
Block a user