| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
It appears that I missed this one when I delegated all the non-mutation
array methods that were not on Enumerable
|
|
|
|
|
|
|
|
|
| |
As was pointed out by #17128, our blacklist of mutation methods was
non-exhaustive (and would need to be kept up to date with each new
version of Ruby). Now that `Relation` includes `Enumerable`, the number
of methods that we actually need to delegate are pretty small. As such,
we can change to explicitly delegating the few non-mutation related
methods that `Array` has which aren't on `Enumerable`
|
| |
|
|
|
|
|
|
|
|
| |
This is a regression 4.0 -> 4.1 fix.
In 4.1.0 Relation#join is delegated to Arel#SelectManager.
In 4.0 series it is delegated to Array#join
This patch puts back the behaviour of 4.0
|
|
|
|
|
|
|
|
| |
This change was necessary because the whitelist wouldn't work.
It would be painful for users trying to update their applications.
This blacklist intent to prevent odd bugs and confusion in code that call mutator
methods directely on the `Relation`.
|
|
|
|
| |
won't last - aim to switch back to a blacklist for mutator methods.
|
| |
|
| |
|
| |
|
|
|
|
| |
addresses "ArgumentError: comparison of VerySpecialComment with SpecialComment failed" in ActiveRecord::DelegationRelationTest#test_#sort!_delegation_is_deprecated
|
|
|
|
| |
Without this, some tests here were not actually testing anything.
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
| |
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)
|
|
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.
|