This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 55adaa2efc08c892bf7be55d79ac571848068256
tree 1e52562f708f64d38ad95e57e42ab39c3ff82ab2
parent e0db925be04ab3e9c3db67dd0daa8caf3680dd21
tree 1e52562f708f64d38ad95e57e42ab39c3ff82ab2
parent e0db925be04ab3e9c3db67dd0daa8caf3680dd21
... |
... |
|
... |
... |
|
... |
... |
|
... |
... |
|





Comments
so… this pretty much means you never run this extremely useful piece of code you added to Rails core, correct?
What never runs?
If you talking about “testing”, it caused a problem in development mode with cache reloading. We didn’t exactly have test coverage for that at the time.
looks like at the moment in time bc5896e was committed with this problem no production applications were using this uber cool mezmorize feature. How come? It’s so valuable and beats ||= every possible way. Josh, can you explain?
I don’t know if it’s just early or what, but I can’t tell if this is supposed to be sarcasm or not. :-\
@michaelklishin: But without abstracting ||= users would have to use the actual Ruby language. Yuck! :)
@GMFlash & michaelklishin:
What do you have against “memoize”? It doesn’t prevent one from still using ||=, it’s just another way of doing the same thing, a “more declarative” way as stated in the documentation of “memoize”.
And it has its pluses: it makes the code of the memoized method clearer (lines of code the result of should be cached are not offset next to or underneath the ”@expensive ||=”), and more importantly: it does memoize nil and false results like you would expect.
ZOMFG
ZOMFG(&:alias_method_chain)@lifo: would you care to elaborate?
Michael,
If you’re not going to add any value with your comments, can I suggest you just don’t bother making them. If you have something useful to add we’d love to hear from you either here or on the mailing list. If you’re just going to troll spouting underinformed opinions based on FUD just save your time and ours and don’t bother.
I think lifo had on mind that alias_method_chain is the same as memoize in a way: declarative, easier, dry, etc. than aliasing by hand. It’s a pattern, so fleshing it out as a method is a good idea.