From: Robert Klemme Date: 2012-02-01T16:48:14+09:00 Subject: Re: Multiple assignment in conditional On Wed, Feb 1, 2012 at 1:22 AM, botp wrote: > On Wed, Feb 1, 2012 at 6:16 AM, Robert Klemme > wrote: >> it's a loop in which case the code often becomes more elegant, e.g.: >> >> while ( line = gets ) > > i dont know, Robert,  since i also find > >  while ( line,x,y = get_something) > > also elegant. > if ruby would support that, wouldn't it be elegant? I find something.each do |line, x, y| ... end more elegant and idiomatic Ruby. That's why I typically use ARGF.each do |line| ... end instead of while ( line = gets ). Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/