aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2014-08-27 01:01:18 +0930
committerMatthew Draper <matthew@trebex.net>2014-08-27 01:04:56 +0930
commitd2d003e8f8051e4d1a941319829603c1c713aedf (patch)
tree9e9609657cfaf7306ce52598301e5f4646079ade /activesupport/test
parent49b27dba286b0f9536f1f0e366a431b762bf7885 (diff)
downloadrails-d2d003e8f8051e4d1a941319829603c1c713aedf.tar.gz
rails-d2d003e8f8051e4d1a941319829603c1c713aedf.tar.bz2
rails-d2d003e8f8051e4d1a941319829603c1c713aedf.zip
Keep the first string we fetch
Otherwise, it's possible for GC to run in between, and fail the test.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/caching_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index 8287e62f4c..5945605f7b 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -939,8 +939,8 @@ class MemCacheStoreTest < ActiveSupport::TestCase
def test_read_should_return_a_different_object_id_each_time_it_is_called
@cache.write('foo', 'bar')
- assert_not_equal @cache.read('foo').object_id, @cache.read('foo').object_id
value = @cache.read('foo')
+ assert_not_equal value.object_id, @cache.read('foo').object_id
value << 'bingo'
assert_not_equal value, @cache.read('foo')
end