From: Christian Neukirchen Date: 2006-02-09T03:47:33+09:00 Subject: Re: block_given? vs defined? yield Joel VanderWerf writes: > Yukihiro Matsumoto wrote: >> Hi, >> >> In message "Re: block_given? vs defined? yield" >> on Thu, 9 Feb 2006 01:42:30 +0900, Daniel Berger writes: >> >> |Is there any difference between "block_given?" vs "defined? yield" ? >> >> They are almost same. The only difference is the former is a method, >> and the latter is a syntax (no call), and consequently the latter >> might be a little bit faster, but practically you can consider them >> same. >> >> matz. > I didn't know block_given? was a method. So there's another possible > difference besides speed: And I didn't know "defined? yield" even existed. ;-) It looks pretty magic to me, I'd personally avoid it. -- Christian Neukirchen http://chneukirchen.org