1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #10318 from vipulnsward/refactor_obvious

refactor initialization of array
This commit is contained in:
Guillermo Iguaran 2013-04-23 06:56:50 -07:00
commit 1bd92ed6b0

View file

@ -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)