aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-07-01 12:16:55 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-07-01 12:16:55 -0700
commit1026d7706ffb467eac3cee8142d964bc2d30baa8 (patch)
tree975e8c0440fa39f11eefdf5f63b7b4f42421823b /activesupport/lib/active_support/cache
parent16dc139caa9286638785469304a69ab77e4fe9b5 (diff)
downloadrails-1026d7706ffb467eac3cee8142d964bc2d30baa8.tar.gz
rails-1026d7706ffb467eac3cee8142d964bc2d30baa8.tar.bz2
rails-1026d7706ffb467eac3cee8142d964bc2d30baa8.zip
Original cache objects should not be immutable [#2860 state:resolved]
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r--activesupport/lib/active_support/cache/memory_store.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/memory_store.rb b/activesupport/lib/active_support/cache/memory_store.rb
index 1b30d49155..21ba79cf3d 100644
--- a/activesupport/lib/active_support/cache/memory_store.rb
+++ b/activesupport/lib/active_support/cache/memory_store.rb
@@ -26,7 +26,7 @@ module ActiveSupport
def write(name, value, options = nil)
super
- @data[name] = value.freeze
+ @data[name] = (value.duplicable? ? value.dup : value).freeze
end
def delete(name, options = nil)