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:
commit
1bd92ed6b0
1 changed files with 1 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue