This project is archived and is in readonly mode.
Unabled to flush memoized values for private methods
Reported by Eric | March 29th, 2009 @ 11:55 PM | in 2.3.4
The attached test demonstrates the problem. The issue is when flushing methods is iterates over "methods" which does not include private methods (only public and protected). The solution might just be to change that code to be:
(methods + private_methods).each do |m| .... end
This would need to happen on both the flushing of the cache as well as the priming of the cache.
Comments and changes to this ticket
-
CancelProfileIsBroken August 5th, 2009 @ 03:53 PM
- Tag changed from 2.3.2, flush, memoize, private to 2.3.2, bugmash, flush, memoize, private
-
jeem August 8th, 2009 @ 10:28 PM
- Tag changed from 2.3.2, bugmash, flush, memoize, private to 2.3.2, bugmash, flush, memoize, patch, private
This is basically the change Eric recommended. It makes the test pass.
-
jeem August 8th, 2009 @ 10:29 PM
- Tag changed from 2.3.2, bugmash, flush, memoize, patch, private to 2.3.2, bugmash, flush, memoize, private
-
Pratik August 8th, 2009 @ 10:51 PM
- Assigned user set to josh
-
Matt Duncan August 8th, 2009 @ 11:30 PM
+1 Nice - applies cleanly to both 2-3-stable and master with all tests passing.
-
Elad Meidar August 9th, 2009 @ 03:18 AM
+1 nice catch.
patch applies cleanly on both 2-3-stable and master with tests passing with flying colors.
-
josh August 9th, 2009 @ 05:05 AM
- State changed from new to open
- Milestone changed from 2.x to 2.3.4
-
Repository August 10th, 2009 @ 02:05 AM
- State changed from open to resolved
(from [e4ceea3795ecc7adcec28a1b9d63782be1401256]) make private_and_public_methods unmemoizable [#2372 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com
http://github.com/rails/rails/commit/e4ceea3795ecc7adcec28a1b9d6378... -
Repository August 10th, 2009 @ 02:05 AM
(from [cc3183d4bec6855b9b5931759a22dd228dfe7687]) make private_and_public_methods unmemoizable [#2372 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com
http://github.com/rails/rails/commit/cc3183d4bec6855b9b5931759a22dd... -
CancelProfileIsBroken August 10th, 2009 @ 02:21 AM
- Tag changed from 2.3.2, bugmash, flush, memoize, private to 2.3.2, flush, memoize, private
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 2372 Unabled to flush memoized values for private methods (from [e4ceea3795ecc7adcec28a1b9d63782be1401256]) make pr...
- 2372 Unabled to flush memoized values for private methods (from [cc3183d4bec6855b9b5931759a22dd228dfe7687]) make pr...