datamapper/dm-validations — pull request #45 by ywen (2011-10-18 05:03:34+00:00)
Title: The issue #44

in lib/dm-validations/validators/block_validator.rb:53

options = fields.last.is_a?(Hash) ? fields.last.pop.dup : {}

It seems the intention is actually

options = fields.last.is_a?(Hash) ? fields.pop.dup : {}

without last, since Hash does't have a pop method

I have fixed this and added two tests for testing it. Please let me know if it is good. Thank you