AS::Callbacks.__run_keyed_callback: remove unused cache #3607

merged 1 commit into from Nov 11, 2011


None yet

2 participants

bogdan commented Nov 11, 2011

__run_keyed_callback defines the callback method on the first run and checks if it was defined (with object.respond_to?). This makes @_keyed_callbacks cache never used:

In order to check that I've add the debug code that indicates cache usage and run test suite for AS and AR - no usages found so far.

/cc @josevalim: sorry for that bug with object/instance context. This PR also fixes one more bug from previous PR.

@josevalim josevalim merged commit 7352efa into rails:master Nov 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment