mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Check whether memoized ivar is initialized
This commit is contained in:
parent
fd71a1a354
commit
8b4461c1a4
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ module ActiveSupport
|
||||||
#{memoized_ivar} ||= {} unless frozen?
|
#{memoized_ivar} ||= {} unless frozen?
|
||||||
reload = args.pop if args.last == true || args.last == :reload
|
reload = args.pop if args.last == true || args.last == :reload
|
||||||
|
|
||||||
if #{memoized_ivar}
|
if defined?(#{memoized_ivar}) && #{memoized_ivar}
|
||||||
if !reload && #{memoized_ivar}.has_key?(args)
|
if !reload && #{memoized_ivar}.has_key?(args)
|
||||||
#{memoized_ivar}[args]
|
#{memoized_ivar}[args]
|
||||||
elsif #{memoized_ivar}
|
elsif #{memoized_ivar}
|
||||||
|
|
Loading…
Reference in a new issue