Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Unabled to flush memoized values for private methods

#2372

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.

Reported by Eric · March 29th, 2009 @ 11:55 PM

State: resolved
Milestone: 2.3.4
Assigned to: josh josh
Importance: none

Activity

  1. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3.2, flush, memoize, private to 2.3.2, bugmash, flush, memoize, private

    August 5th, 2009 @ 03:53 PM

  2. jeem
    jeem
    • 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.

    August 8th, 2009 @ 10:28 PM

  3. jeem
    jeem
    • Tag changed from 2.3.2, bugmash, flush, memoize, patch, private to 2.3.2, bugmash, flush, memoize, private

    August 8th, 2009 @ 10:29 PM

  4. Pratik
    Pratik
    • Assigned user set to josh

    August 8th, 2009 @ 10:51 PM

  5. Matt Duncan
    Matt Duncan

    +1 Nice - applies cleanly to both 2-3-stable and master with all tests passing.

    August 8th, 2009 @ 11:30 PM

  6. Elad Meidar
    Elad Meidar

    +1 nice catch.

    patch applies cleanly on both 2-3-stable and master with tests passing with flying colors.

    August 9th, 2009 @ 03:18 AM

  7. Rizwan Reza
    Rizwan Reza

    verified

    +1 the patch applies cleanly. All tests pass.

    August 9th, 2009 @ 04:49 AM

  8. josh
    josh
    • State changed from new to open
    • Milestone changed from 2.x to 2.3.4

    August 9th, 2009 @ 05:05 AM

  9. Repository
  10. Repository
  11. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3.2, bugmash, flush, memoize, private to 2.3.2, flush, memoize, private

    August 10th, 2009 @ 02:21 AM