diff options
author | Brian Durand <brian@embellishedvisions.com> | 2012-09-30 21:56:47 -0700 |
---|---|---|
committer | Brian Durand <brian@embellishedvisions.com> | 2012-09-30 21:56:47 -0700 |
commit | b784900208c0ea4343a75fa1cefdb1872fa14f7b (patch) | |
tree | a5106f9936361ac3820630ce1dc8ca64e8532e03 /activesupport | |
parent | 34239cc511ac8de9a23e84fd6835a2f2440d2863 (diff) | |
download | rails-b784900208c0ea4343a75fa1cefdb1872fa14f7b.tar.gz rails-b784900208c0ea4343a75fa1cefdb1872fa14f7b.tar.bz2 rails-b784900208c0ea4343a75fa1cefdb1872fa14f7b.zip |
fix broken cache tests
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/cache.rb | 4 | ||||
-rw-r--r-- | activesupport/test/caching_test.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index a681a8d6a9..690e5ce194 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -591,9 +591,9 @@ module ActiveSupport when NilClass 0 when String - value.bytesize + @v.bytesize else - @s = Marshal.dump(value).bytesize + @s = Marshal.dump(@v).bytesize end end end diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index f8e4dd6349..75540346c1 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -616,7 +616,7 @@ end class MemoryStoreTest < ActiveSupport::TestCase def setup - @record_size = Marshal.dump("aaaaaaaaaa").bytesize + @record_size = ActiveSupport::Cache::Entry.new("aaaaaaaaaa").size @cache = ActiveSupport::Cache.lookup_store(:memory_store, :expires_in => 60, :size => @record_size * 10) end |