aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
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/test
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/test')
-rw-r--r--activesupport/test/caching_test.rb6
1 files changed, 6 insertions, 0 deletions
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