mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Refactor to not call path.ast twice
This commit is contained in:
parent
706fb0184d
commit
94ecbb7e7b
1 changed files with 3 additions and 2 deletions
|
@ -31,8 +31,9 @@ module ActionDispatch
|
|||
|
||||
def ast
|
||||
@decorated_ast ||= begin
|
||||
path.ast.grep(Nodes::Terminal).each { |n| n.memo = self }
|
||||
path.ast
|
||||
decorated_ast = path.ast
|
||||
decorated_ast.grep(Nodes::Terminal).each { |n| n.memo = self }
|
||||
decorated_ast
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue