From: Josh Cheek Date: 2011-06-06T18:41:54+09:00 Subject: Re: Behaviour of different Proc types --bcaec50166b7c4c70104a507e9bd Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jun 2, 2011 at 11:22 PM, Josh Cheek wrote: > I realized that I just can't ever remember the different proc types > behaviours. So I wrote a script to check them. > https://gist.github.com/1005840 > > My conclusion: > proc: Avoid this, since its behaviour differs across commonly used > [versions]. > lambda: Use this if you want it to behave like a method. > Proc.new: Use this if you want it to behave like a block. > > Is that reasonable? Any thoughts or insights? Do you have a different set > of rules or a more elegant conclusion? > > I've added the note that -> is a synonym for lambda in 1.9. ----- Several people have posted links to articles, I appreciate that you are interested enough to post these, but it's unclear what you want me to get out of them, and they tend to be very long. It would help me, and probably other readers if you could summarize whether they agree with / disagree with / expound on / or amend my conclusion, and maybe a sentence explaining what specifically we should should be paying attention to, if we invest the hour or so it would take to read the article. --bcaec50166b7c4c70104a507e9bd--