This project is archived and is in readonly mode.
Zero-arity conditional validation procs broken by AS::NewCallbacks
-
Sam Pohlenz
After some more digging, it seems the problem is due to a variation between Ruby 1.8 and 1.9.
In 1.8.6 and 1.8.7, Proc.new {}.arity == -1, whereas in 1.9, Proc.new {}.arity == 0.
A possible fix for this then, is to replace in ActiveSupport::NewCallbacks::_compile_filter:
return method_name if filter.arity == 0with
return method_name if filter.arity <= 0however this will break support for splatted proc arguments.
Whilst the problem lies in ActiveSupport::NewCallbacks, I have not yet been able to create a test case that isolates the problem.
-
CancelProfileIsBroken
- Tag changed from activemodel, activerecord, activesupport, patch to activemodel, activerecord, activesupport, bugmash, patch
-
Rizwan Reza
- Tag changed from activemodel, activerecord, activesupport, bugmash, patch to activemodel, activerecord, activesupport
- State changed from new to open
Were you able to get to the problem Sam? Is this still applicable?
-
Sam Pohlenz
This appears to now be fixed. Thanks.
-
Rizwan Reza
- State changed from open to resolved
-
Rizwan Reza
- No changes were found…
