From: botp Date: 2007-04-10T02:00:20+09:00 Subject: Re: code blocks and methods On 4/9/07, Rick DeNatale wrote: > Not really, blocks are instances of Proc, they are not methods: > irb(main):001:0> def block_class(&b) i hope we don't generalize that much. Here eg, we are explicitly converting a block to a proc. > But the pedagogical explanation that a block is an unnamed method is > useful to beginners. i prefer to refer to blocks as just mere codes that cannot stand on their own yet. They have to be proc-ified or lamba-fied or yielded as code blocks in methods. but I really hoped that methods, procs, and lambdas be unified. Their functions look very similar. kind regards -botp