From: Takaaki Tateishi Date: 2005-03-07T01:24:06+09:00 Subject: Re: ruby-dev summary 25741-25780 Christian Neukirchen wrote: > What about foo { |a| ... } { |b| ... } ? }:-) In my opinion, foo{|a|...}{|b|...} had better be semantically equivalent to foo(){|a|...}(){|b|...} at this time. What do you think? For example, we can write the following code. myif = {|&cond| if( cond() ) {|&then_block| {|&else_block| then_block()}} else {|&then_block| {|&else_block| else_block()}} end } I hope we are able to invoke the above Proc object as follows. myif{ true }{"then"}{"else"} myif(){ true }(){"then"}(){"else"} The second form is not accepted from incorrect syntax so far, despite the following accepted code. f = myif(){ false } g = f(){"then"} h = g(){"else"} -- Takaaki Tateishi