dkubb/memoizable — pull request #8 by dkubb (2013-12-13 07:14:17+00:00)
Title: Change memoized method to not accept a block

This branch changes the memoized method to not accept a block.

Originally in #6 we discussed using `block_given?` but it does not behave as expected within `define_block`. I changed it to yield `|&block|` which allows me to test `block` and raise an exception if a block was passed.

The only downside with this approach is that under `1.8.7` the new memoized method changes it's arity to `1`. The method arity is correctly reported as `0` for 1.9.3+. I added a guard clause to skip this test under 1.8.7, but if anyone can think of an approach that allows the arity to remain `0` under 1.8.7 please let me know.