From: "Mauricio Fernández" Date: 2004-01-26T22:25:04+09:00 Subject: Re: Blocks as Block / Proc parameters On Mon, Jan 26, 2004 at 07:55:00PM +0900, Robert Klemme wrote: > > What would you think about Kernel::block_given, returning a Proc > > corresponding to the block or nil? > > I don't like it because it imposes the additional overhead of a proc > creation even for cases when you just want the boolean information. How > about extending Proc to accept blocks like this: We have Kernel.block_given? already... so having Kernel.block_given too seems most natural to me, and it looks easier to implement than adding an optional &block to the block args. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Not only Guinness - Linux is good for you, too. -- Banzai on IRC