From: ts Date: 2003-01-08T23:34:25+09:00 Subject: Re: Can you detect if a method takes a block argument? >>>>> "M" == Martin Weber writes: >> use_block?("[1,2,3].sort") M> => true Re-read his message >>>>> "M" == Martin Hart writes: M> The bit that I don't know how to do is: M> 1. If client detects that the requested method takes a block argument, it M> should: M> a) pass the block given to it (if there was one), or M> b) create a dummy block that fills a return array, because the caller M> didn't provide a block. You really *always* want to call Array#sort with a block ? Guy Decoux