datamapper/dm-validations — Issue #44: validates_with_block is broken when passing in an option hash
Author: ywen
Created: 2011-10-15 03:31:19+00:00
State: open

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