From 5e6a85df06f99c489c96939561e33bf6f5a5dd4f Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Tue, 23 Apr 2013 19:06:49 +0530 Subject: [PATCH] refactor initialization of array --- activesupport/lib/active_support/callbacks.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 2f9247a77b..893c2500d7 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -340,10 +340,7 @@ module ActiveSupport end def compile - method = [] - method << "value = nil" - method << "halted = false" - + method = ["value = nil", "halted = false"] callbacks = "value = !halted && (!block_given? || yield)" reverse_each do |callback| callbacks = callback.apply(callbacks)