diff options
author | José Valim <jose.valim@gmail.com> | 2011-06-15 17:08:08 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-06-15 17:08:08 -0300 |
commit | 36253916b0b788d6ded56669d37c96ed05c92c5c (patch) | |
tree | b09d5b707d15333b160769af53efb19f60f878cf /activesupport/lib | |
parent | 6c3e80af685393b1069b96af3193625137e9b29e (diff) | |
download | rails-36253916b0b788d6ded56669d37c96ed05c92c5c.tar.gz rails-36253916b0b788d6ded56669d37c96ed05c92c5c.tar.bz2 rails-36253916b0b788d6ded56669d37c96ed05c92c5c.zip |
Deprecate memoizable.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/memoizable.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/memoizable.rb b/activesupport/lib/active_support/memoizable.rb index 279f1cf71f..363d799587 100644 --- a/activesupport/lib/active_support/memoizable.rb +++ b/activesupport/lib/active_support/memoizable.rb @@ -1,8 +1,15 @@ require 'active_support/core_ext/kernel/singleton_class' require 'active_support/core_ext/module/aliasing' +require 'active_support/deprecation' module ActiveSupport module Memoizable + def self.extended(base) + ActiveSupport::Deprecation.warn "ActiveSupport::Memoizable is deprecated and will be removed in future releases," \ + "simply use Ruby instead.", caller + super + end + def self.memoized_ivar_for(symbol) "@_memoized_#{symbol.to_s.sub(/\?\Z/, '_query').sub(/!\Z/, '_bang')}".to_sym end |