Skip to content
Browse files

Don't rememoize if already frozen

  • Loading branch information...
1 parent eb25671 commit ae6105ef01b2a767afa2bf5b64c90d288c752995 @jeremy jeremy committed Jul 27, 2008
Showing with 3 additions and 4 deletions.
  1. +3 −4 activesupport/lib/active_support/memoizable.rb
View
7 activesupport/lib/active_support/memoizable.rb
@@ -11,10 +11,9 @@ def self.included(base)
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

0 comments on commit ae6105e

Please sign in to comment.
Something went wrong with that request. Please try again.