aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/memoizable.rb
diff options
context:
space:
mode:
authorAndrew Kaspick <andrew@redlinesoftware.com>2010-09-23 16:48:35 -0500
committerSantiago Pastorino <santiago@wyeworks.com>2010-09-24 20:31:12 -0300
commitfb08e334d61b1706db754733b209075b0154b57e (patch)
tree532e994412d32504ea48e1492579eee5c6df724a /activesupport/lib/active_support/memoizable.rb
parent72543b2e6358a502257a0e1eac61b0e3164937dd (diff)
downloadrails-fb08e334d61b1706db754733b209075b0154b57e.tar.gz
rails-fb08e334d61b1706db754733b209075b0154b57e.tar.bz2
rails-fb08e334d61b1706db754733b209075b0154b57e.zip
memoized protected methods should remain protected
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activesupport/lib/active_support/memoizable.rb')
-rw-r--r--activesupport/lib/active_support/memoizable.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/memoizable.rb b/activesupport/lib/active_support/memoizable.rb
index 9fb506fea1..0a7bcd5bb8 100644
--- a/activesupport/lib/active_support/memoizable.rb
+++ b/activesupport/lib/active_support/memoizable.rb
@@ -95,6 +95,8 @@ module ActiveSupport
#
if private_method_defined?(#{original_method.inspect}) # if private_method_defined?(:_unmemoized_mime_type)
private #{symbol.inspect} # private :mime_type
+ elsif protected_method_defined?(#{original_method.inspect}) # elsif protected_method_defined?(:_unmemoized_mime_type)
+ protected #{symbol.inspect} # protected :mime_type
end # end
EOS
end