mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't rememoize if already frozen
This commit is contained in:
parent
eb256718c3
commit
ae6105ef01
1 changed files with 3 additions and 4 deletions
|
@ -11,10 +11,9 @@ module ActiveSupport
|
|||
|
||||
def freeze_with_memoizable
|
||||
methods.each do |method|
|
||||
if m = method.to_s.match(/^_unmemoized_(.*)/)
|
||||
send(m[1])
|
||||
end
|
||||
end
|
||||
__send__($1) if method.to_s =~ /^_unmemoized_(.*)/
|
||||
end unless frozen?
|
||||
|
||||
freeze_without_memoizable
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue