From 2a5c92c1017a805fbc8dad3f5fbf5e9fe7dda2c4 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 12 Oct 2009 21:44:30 -0500 Subject: Kill unused SafelyMemoizable [#3323 state:resolved] --- activesupport/lib/active_support/memoizable.rb | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'activesupport/lib/active_support/memoizable.rb') 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 -- cgit v1.2.3