Skip to content

Commit

Permalink
adds a comment to clarify an edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Nov 21, 2011
1 parent 60e3e21 commit 91678a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions activesupport/lib/active_support/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,9 @@ def raw_value

# 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
Expand Down

0 comments on commit 91678a5

Please sign in to comment.