5 ms·
Passing Blocks in Ruby Without &block
- spellboots 16y agoHeh awesome! Oh btw, I have one for you: alias become="sudo ~/s -" (in .bashrc)
- 3pt14159 16y agoThese are really cool and understanding how magic is implemented is great, but when you are searching for the "tell_ape" method for 10 mins only to realize that method_missing is doing the magic, it really is a bit of a piss off. If you are going to do these tricks please for the nonwizard ruby coders out there make it blatantly obvious in your README or comments or tests.
- mudgemeister 16y agoThis is a fair criticism: I've now updated the examples so they don't involve method_missing so as to not needlessly complicate the issue.
- 3pt14159 16y agoOh! I didn't mean to insult you or the blog post, I liked it very much, I meant in production code or open source projects. Your blog post was very straightforward and interesting.