From: Jim Freeze Date: 2005-08-07T13:43:18+09:00 Subject: Re: new block notation > block and in the method/lambda/block definition the "&" > converts a block to a lambda. Well, how about making the unary > "&" in front of a block converting it to a lambda? > > f = &{...} # equivalent to f = lambda{...} > > This is not really a unary "&" operator but rather a &{...} > construct, but it does flow with the current unary "&" syntax, > kind of. > def test(lam=nil,&block) > ... > end > > test ->(..){..} This looks similar to what exists now in 1.8.2. block = lambda { ... } test(&block) #=> lam =nil test(block) #=> lam = block -- Jim Freeze