aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/memoizable.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/memoizable.rb b/activesupport/lib/active_support/memoizable.rb
index 21636b8af4..23dd96e4df 100644
--- a/activesupport/lib/active_support/memoizable.rb
+++ b/activesupport/lib/active_support/memoizable.rb
@@ -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