From 4cfc05e32a362d593d758c8be88d4e27dbfc3921 Mon Sep 17 00:00:00 2001 From: Jason Hiltz-Laforge Date: Tue, 15 Jul 2014 18:31:40 +0000 Subject: [PATCH] Optimize checking for interrupts by replacing any? with NOT empty? --- lib/liquid/context.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/liquid/context.rb b/lib/liquid/context.rb index a35dcf2..cd4b9d4 100644 --- a/lib/liquid/context.rb +++ b/lib/liquid/context.rb @@ -73,7 +73,7 @@ module Liquid # are there any not handled interrupts? def has_interrupt? - @interrupts.any? + !@interrupts.empty? end # push an interrupt to the stack. this interrupt is considered not handled.