diff options
author | jeem <jeem@hughesorama.com> | 2009-08-09 20:04:15 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-08-09 20:04:48 -0500 |
commit | e4ceea3795ecc7adcec28a1b9d63782be1401256 (patch) | |
tree | d340c2d7a279ba3667094183a114b8684edf6fae /activesupport/lib | |
parent | ca92d44e7637ae6d28d6b88b67873d2795290cb5 (diff) | |
download | rails-e4ceea3795ecc7adcec28a1b9d63782be1401256.tar.gz rails-e4ceea3795ecc7adcec28a1b9d63782be1401256.tar.bz2 rails-e4ceea3795ecc7adcec28a1b9d63782be1401256.zip |
make private_and_public_methods unmemoizable [#2372 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/memoizable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/memoizable.rb b/activesupport/lib/active_support/memoizable.rb index fa6db683d4..7724b9d88b 100644 --- a/activesupport/lib/active_support/memoizable.rb +++ b/activesupport/lib/active_support/memoizable.rb @@ -59,7 +59,7 @@ module ActiveSupport def flush_cache(*syms, &block) syms.each do |sym| - methods.each do |m| + (methods + private_methods + protected_methods).each do |m| if m.to_s =~ /^_unmemoized_(#{sym})/ ivar = ActiveSupport::Memoizable.memoized_ivar_for($1) instance_variable_get(ivar).clear if instance_variable_defined?(ivar) |