diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2015-09-05 11:33:21 +1200 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2015-09-05 11:33:21 +1200 |
commit | c431f1754b4329b972ce2e715df0e33aeaee7d30 (patch) | |
tree | a37ebccece492962a5da85cea06f55c4fabbbf78 /activerecord/bin | |
parent | 21ffef38a5dc5a6a21f7e841aecab5b51f4fd185 (diff) | |
download | rails-c431f1754b4329b972ce2e715df0e33aeaee7d30.tar.gz rails-c431f1754b4329b972ce2e715df0e33aeaee7d30.tar.bz2 rails-c431f1754b4329b972ce2e715df0e33aeaee7d30.zip |
#where fails if opts.responds_to?(:==) unexpectedly
Sometimes opts passed in might respond to ==, e.g. `Arel::Nodes::Grouping`. In this case, `opts == :chain` returns `Arel::Nodes::Equality` which causes odd behaviour. Prefer `if :chain == opts` which guarantees that `Symbol#==` would be invoked. Alternatively consider `eql?`.
Diffstat (limited to 'activerecord/bin')
0 files changed, 0 insertions, 0 deletions