Skip to content

on SchemaCache use the connection getter instead of the obj given #12176

Merged
merged 1 commit into from Sep 10, 2013

4 participants

@arthurnn
Ruby on Rails member
arthurnn commented Sep 9, 2013

Hash default_proc needs to use the connection getter to avoid inconsistent results if the connection ivar is changed.

Ideally @connection cannot be changed on schema_cache as it doesnt have a setter, but we still can instance_variable_set(:@connection, conn). Therefore we need to use the getter on the proc so it will always use the ivar.

As this is super small, and trivial, IMO, it doesn't justify adding tests for it. (also this behaviour is fixed on rails4)

feedback ? @carlosantoniodasilva @rafaelfranca

@spastorino spastorino merged commit 143e009 into rails:3-2-stable Sep 10, 2013

1 check passed

Details default The Travis CI build passed
@carlosantoniodasilva
Ruby on Rails member

:smile:

@rafaelfranca
Ruby on Rails member

:+1:

@arthurnn arthurnn deleted the arthurnn:ar32_schema_cache branch Sep 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.