diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-02-02 09:54:27 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-02-02 09:54:27 -0800 |
commit | 6faff0223b4470a6c1c66664f1b3df94de206841 (patch) | |
tree | e0a794c053a428e3f73301c90ffc2fe934d08b06 | |
parent | 44cdf0c5fe080d470429ab0640af25e927244907 (diff) | |
parent | 4945d92b03e7cd26e5307c8683eac47e4a90026d (diff) | |
download | rails-6faff0223b4470a6c1c66664f1b3df94de206841.tar.gz rails-6faff0223b4470a6c1c66664f1b3df94de206841.tar.bz2 rails-6faff0223b4470a6c1c66664f1b3df94de206841.zip |
Merge commit 'rails/3-0-unstable'
-rwxr-xr-x | actionpack/lib/action_dispatch/http/request.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/memoizable.rb | 25 |
2 files changed, 0 insertions, 26 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 94cce869f7..a2c14f7ea2 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 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| |