While checking out the terrain for another bigger fix, I stumbled across a little inconsistency in AR::Base.
In the SQL builder methods, add_joins!, add_limit! and add_lock! currently take the full options hash whereas their siblings, add_conditions!, add_order! and add_group! take only their relevant attribute. While I see why add_limit! needs to do that (it may take both, :limit and :offset), add_lock! and add_joins! only use their respective options and no other one.
I therefore propose the attached patch to always (and therefore consistently) pass in the full options hash. Although it's only an internally used, private method I think that consistency is still important.
All existing tests pass (apart from the two tests that seem to be failing anyways in the current Edge).