aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/memoizable.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-10-13 15:06:43 -0300
committerEmilio Tagua <miloops@gmail.com>2009-10-13 15:06:43 -0300
commit991d1bc200d6fdc379bc83610bc92a4e220c669e (patch)
tree84ace4c9c117ba7bc82824dbddf15485a9305bd2 /activesupport/lib/active_support/memoizable.rb
parent0cf4662ec589813c4fdc22de3398730cab05c5ed (diff)
parent9cd50e7752650a3d6bf8545b51d50619d6e70c0b (diff)
downloadrails-991d1bc200d6fdc379bc83610bc92a4e220c669e.tar.gz
rails-991d1bc200d6fdc379bc83610bc92a4e220c669e.tar.bz2
rails-991d1bc200d6fdc379bc83610bc92a4e220c669e.zip
Merge commit 'rails/master'
Diffstat (limited to 'activesupport/lib/active_support/memoizable.rb')
-rw-r--r--activesupport/lib/active_support/memoizable.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/activesupport/lib/active_support/memoizable.rb b/activesupport/lib/active_support/memoizable.rb
index b197fbc9bf..f810f53029 100644
--- a/activesupport/lib/active_support/memoizable.rb
+++ b/activesupport/lib/active_support/memoizable.rb
@@ -2,19 +2,6 @@ require 'active_support/core_ext/object/metaclass'
require 'active_support/core_ext/module/aliasing'
module ActiveSupport
- module SafelyMemoizable
- def safely_memoize(*symbols)
- symbols.each do |symbol|
- class_eval <<-RUBY, __FILE__, __LINE__ + 1
- def #{symbol}(*args)
- memoized = @_memoized_#{symbol} || ::ActiveSupport::ConcurrentHash.new
- memoized[args] ||= memoized_#{symbol}(*args)
- end
- RUBY
- end
- end
- end
-
module Memoizable
def self.memoized_ivar_for(symbol)
"@_memoized_#{symbol.to_s.sub(/\?\Z/, '_query').sub(/!\Z/, '_bang')}".to_sym