Skip to content

Commit

Permalink
Merge pull request petergoldstein#197 from laserlemon/master
Browse files Browse the repository at this point in the history
Storing false
  • Loading branch information
mperham committed Apr 11, 2012
2 parents 020c2e5 + 4681b75 commit d47bf66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions History.md
Expand Up @@ -4,6 +4,7 @@ Dalli Changelog
HEAD
=======

- Allow proper retrieval of stored `false` values \[[#197](https://github.com/mperham/dalli/pull/197)\] ([@laserlemon](https://github.com/laserlemon))
- Allow non-ascii and whitespace keys, only the text protocol has those restrictions [#145]
- Fix DalliStore#delete error-handling [#196]

Expand Down
2 changes: 1 addition & 1 deletion lib/dalli/client.rb
Expand Up @@ -46,7 +46,7 @@ def multi

def get(key, options=nil)
resp = perform(:get, key)
(!resp || resp == 'Not found') ? nil : resp
resp.nil? || resp == 'Not found' ? nil : resp
end

##
Expand Down
6 changes: 6 additions & 0 deletions test/test_dalli.rb
Expand Up @@ -330,6 +330,12 @@
resp = dc.get('456', :raw => true)
assert_equal '0xyz9', resp

resp = dc.set('456', false)
assert_equal true, resp

resp = dc.get('456')
assert_equal false, resp

resp = dc.stats
assert_equal Hash, resp.class

Expand Down

0 comments on commit d47bf66

Please sign in to comment.