Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Allow methods arity below -1 in assert_responds. | Federico Ravasio | 2013-10-08 | 1 | -3/+4 |
| | | | | | | | | Every method from MRI's core classes is written in C. This means Method#arity always returns -1 for methods with a variable number of arguments. This is not the case with Rubinius, where, for example Array#slice! is implemented in Ruby and has arity -2, since is defined as def slice!(start, length = undefined) | ||||
* | Deprecate the delegation of Array bang methods in ActiveRecord::Delegation | Ben Woosley | 2013-09-04 | 1 | -0/+97 |
The primary means of returning results for Array bang methods is to modify the array in-place. When you call these methods on a relation, that array is created, modified, and then thrown away. Only the secondary return value is exposed to the caller. Removing this delegation is a straight-forward way to reduce user error by forcing callers to first explicitly call #to_a in order to expose the array to be acted on by the bang method. |