aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-08-19 19:20:10 -0500
committerJoshua Peek <josh@joshpeek.com>2008-08-19 19:20:10 -0500
commit5de340e79f1d11973b7c7bbec82f320fc92b9c99 (patch)
tree71673fecc53a7904629424522feafaaca933f2c2 /activesupport/lib/active_support
parenta8ece12fe2ac7838407954453e0d31af6186a5db (diff)
downloadrails-5de340e79f1d11973b7c7bbec82f320fc92b9c99.tar.gz
rails-5de340e79f1d11973b7c7bbec82f320fc92b9c99.tar.bz2
rails-5de340e79f1d11973b7c7bbec82f320fc92b9c99.zip
Ensure objects cached with MemoryStore are immutable
Diffstat (limited to 'activesupport/lib/active_support')
-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 7ac6f35357..f3e4b8c13b 100644
--- a/activesupport/lib/active_support/cache/memory_store.rb
+++ b/activesupport/lib/active_support/cache/memory_store.rb
@@ -22,7 +22,7 @@ module ActiveSupport
def write(name, value, options = nil)
@guard.synchronize do
super
- @data[name] = value
+ @data[name] = value.freeze
end
end