From: Dave Bass Date: 2008-05-28T18:24:29+09:00 Subject: Re: OOP in Ruby? In Ruby you only need to add "lambda" to make a block into an object: irb(main):006:0> x = lambda { i += 1 } => # irb(main):007:0> x.class => Proc irb(main):008:0> lambda { i += 1 }.class => Proc I suppose the need to prepend "lambda" is a good thing in that it gives you the flexibility of choosing whether you want to make your block into an object or not, whereas in Smalltalk presumably all blocks are automatically objects. There may be some small overhead associated with this, I don't know. Declaring blocks with "lambda" is a bit like declaring variables before you can use them, something I miss with Ruby. -- Posted via http://www.ruby-forum.com/.