From: Joel VanderWerf Date: 2009-05-14T13:27:50+09:00 Subject: Re: [bikeshed] Syntactic sugar idea Daniel DeLorme wrote: > It seems that often an object will be passed into a block only to invoke > a method of that object: > arr.map{ |obj| obj.some_method } > > So I had the (weird? stupid?) thought that it would be nice to have some > syntactic sugar like this: > arr.map{ .some_method } > > Does that make any sense? It would be nice for avoiding instance_eval in DSLs: @x = 400 @y = 300 config "my window" do .width @x .height @y end but I just don't see how to fit it into ruby... -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407