aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/memoizable.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/memoizable.rb b/activesupport/lib/active_support/memoizable.rb
index 7724b9d88b..b197fbc9bf 100644
--- a/activesupport/lib/active_support/memoizable.rb
+++ b/activesupport/lib/active_support/memoizable.rb
@@ -57,10 +57,10 @@ module ActiveSupport
end
end
- def flush_cache(*syms, &block)
+ def flush_cache(*syms)
syms.each do |sym|
(methods + private_methods + protected_methods).each do |m|
- if m.to_s =~ /^_unmemoized_(#{sym})/
+ if m.to_s =~ /^_unmemoized_(#{sym.to_s.gsub(/\?\Z/, '\?')})/
ivar = ActiveSupport::Memoizable.memoized_ivar_for($1)
instance_variable_get(ivar).clear if instance_variable_defined?(ivar)
end