basho/riak-ruby-client — pull request #39 by tammofreese (2012-06-01 09:44:43+00:00)
Title: Untested (!) simplification of take method

On one of his EuRuKo slides, Sean Cribbs had the implementation of the take method.

I think it can be simplified by moving the begin..rescue..ensure..end directly into the method, so the core part of the method is indented less, and the method is 4 lines shorter.

Beware: This simplification is untested (the specs have some dependencies I've been too lazy to sort out ;) ), so if you decide that you like the code better, please run the test on a full riak installation.