aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-11-21 13:53:40 -0800
committerXavier Noria <fxn@hashref.com>2011-11-21 13:53:40 -0800
commit91678a5b29bca29aae4a987615f2503067032802 (patch)
tree11f59401901c35eb64595b6e10f8727e4a9c5972 /activesupport
parent60e3e218c2336a6359b36e17213f31cc35e65bbf (diff)
downloadrails-91678a5b29bca29aae4a987615f2503067032802.tar.gz
rails-91678a5b29bca29aae4a987615f2503067032802.tar.bz2
rails-91678a5b29bca29aae4a987615f2503067032802.zip
adds a comment to clarify an edge case
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/cache.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index ba3064a24e..97583c9bd9 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -573,6 +573,9 @@ module ActiveSupport
# Get the value stored in the cache.
def value
+ # If the original value was exactly false @value is still true because
+ # it is marshalled and eventually compressed. Both operations yield
+ # strings.
if @value
Marshal.load(compressed? ? Zlib::Inflate.inflate(@value) : @value)
end