From 8da52b13b5a565d4c41c3e3b3f2562f3f1852a56 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 31 Jan 2009 14:44:04 -0800 Subject: [PATCH 1/2] Remove duplicate ConcurrentHash --- .../lib/active_support/memoizable.rb | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/activesupport/lib/active_support/memoizable.rb b/activesupport/lib/active_support/memoizable.rb index 8e9abeaf91..bd9dbb60fc 100644 --- a/activesupport/lib/active_support/memoizable.rb +++ b/activesupport/lib/active_support/memoizable.rb @@ -1,29 +1,4 @@ module ActiveSupport - class ConcurrentHash - def initialize(hash = {}) - @backup_cache = hash.dup - @frozen_cache = hash.dup.freeze - @mutex = Mutex.new - end - - def []=(k,v) - @mutex.synchronize { @backup_cache[k] = v } - @frozen_cache = @backup_cache.dup.freeze - end - - def [](k) - if @frozen_cache.key?(k) - @frozen_cache[k] - else - @mutex.synchronize { @backup_cache[k] } - end - end - - def empty? - @backup_cache.empty? - end - end - module SafelyMemoizable def safely_memoize(*symbols) symbols.each do |symbol| From 4945d92b03e7cd26e5307c8683eac47e4a90026d Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 31 Jan 2009 14:46:02 -0800 Subject: [PATCH 2/2] Remove dead cgi_ext require --- actionpack/lib/action_dispatch/http/request.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 0da7daacf2..325f2cdca4 100755 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -3,7 +3,6 @@ require 'stringio' require 'strscan' require 'active_support/memoizable' -require 'action_controller/cgi_ext' module ActionDispatch class Request < Rack::Request