On Apr 17, 2011, at 14:40 , Michael Edgar wrote:

> Hi Brian =96 Thanks for sharing your thoughts!  Since much of what you =
note
> is commonly accepted about Ruby, I am happy that my research is
> subtle enough to warrant such discussion (and interesting enough to =
get
> an e-mail or two!)=20
>=20
> If you don't mind, I'd like to write a blog post sharing your concerns
> (anonymized, naturally) and my responses. Would that be okay?
>=20
>> Points I'd raise:
>>=20
>> 1. In my experience, very little real-world Ruby code uses=20
>> 'block_given?'. If it needs to yield, it just yields. I'd consider =
this=20
>> to be a case of duck-typing.
>=20
> This seems to suggest Rubyists rarely write methods that take blocks
> optionally. Of this, I am highly skeptical.=20

You should be highly skeptical.

=46rom our seattle.rb projects:

% ack -l block_given? */dev/{lib,test} | wc -l
      28

And from my gauntlet setup:

% ls | wc -l
   20245
% find ~/.gauntlet -type f | xargs zgrep -l block_given? | wc -l
    4715

So roughly 1 in 4 gems in my gauntlet downloads use block_given?

I think that makes it clear that your work can provide a lot of insight.