From: Jean-Denis Vauguet Date: 2006-09-15T08:20:55+09:00 Subject: Re: Question about 'unless' (negated if) Lincoln Anderson wrote: > dir.each {|str| > ftp.get(str) unless str.index('d') == 0 > else > str = str.split('/') > # ... > end > } > end You'll get an unexpected kELSE error on line 3. The unless statement is still applyins only to line 2 here, it acts as the negative form of if BUT as a oneliner. To actually create a block-like behavior, you must write something like: unless 1 == 2 then puts "foo" else puts "bar" end (looks like an if statement, doesn't 'it ?)