aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-03-02 09:18:05 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-03-02 09:18:05 -0800
commit66245441d4471f29043433f6cf789498cf35b96c (patch)
treef3ac7db0c59f00d36baa7a82a006c7fd4cf0c135 /activesupport/lib
parent2ee55557440a644453482a678e4ff08a4b5ebd3e (diff)
downloadrails-66245441d4471f29043433f6cf789498cf35b96c.tar.gz
rails-66245441d4471f29043433f6cf789498cf35b96c.tar.bz2
rails-66245441d4471f29043433f6cf789498cf35b96c.zip
adding backwards compat for class cache references. <3<3
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/dependencies.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index d5c51ca417..97e20bdaf4 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -549,10 +549,21 @@ module ActiveSupport #:nodoc:
end
alias :get :[]
+ class Getter # :nodoc:
+ def initialize(name)
+ @name = name
+ end
+
+ def get
+ Reference.get @name
+ end
+ end
+
def new(name)
self[name] = name
- self
+ Getter.new(name)
end
+ deprecate :new
def clear!
@store.clear