From: Martin Hart Date: 2003-01-08T23:11:22+09:00 Subject: Re: Can you detect if a method takes a block argument? On 1/8/03, 1:50:47 PM, ts wrote regarding Re: Can you detect if a method takes a block argument?: > >>>>> "M" == Martin Hart writes: > M> Is there a way to tell whether or not a method takes a block argument? > Briefly, no. > For example, Array#sort can be used with or without a block. Thanks for the information Guy, So the only way to accomplish what I want is to have all of the methods that I might call be able to take a block and work sensibly whether or not it is given, (like Array#sort). That's not something that I want to do - I think it will pollute the design too much. Guess I'll rethink :-) PS - When you say "Briefly, no" (as opposed to just "No"), does that mean that it might be possible (without hacking Ruby itself I mean) :-) Cheers Martin