From 1026d7706ffb467eac3cee8142d964bc2d30baa8 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 1 Jul 2009 12:16:55 -0700 Subject: Original cache objects should not be immutable [#2860 state:resolved] Signed-off-by: Yehuda Katz + Carl Lerche --- activesupport/lib/active_support/cache/memory_store.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') 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) -- cgit v1.2.3