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/test/caching_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/test') diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index c2a03818e1..928af256f4 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -176,6 +176,12 @@ class MemoryStoreTest < ActiveSupport::TestCase assert_raise(ActiveSupport::FrozenObjectError) { @cache.read('foo').gsub!(/.*/, 'baz') } assert_equal 'bar', @cache.read('foo') end + + def test_original_store_objects_should_not_be_immutable + bar = 'bar' + @cache.write('foo', bar) + assert_nothing_raised { bar.gsub!(/.*/, 'baz') } + end end uses_memcached 'memcached backed store' do -- cgit v1.2.3