From: Su Zhang Date: 2011-06-11T10:29:39+09:00 Subject: Re: strange ruby error On 6/10/2011 9:25 PM, Junkone wrote: > i get strange error test.rb.rb:14: syntax error, unexpected '}' > > makes no sense as the only time i use } is to close the each block. pl > help > require 'fastercsv' > #put everything in an array > array = FasterCSV.read("c:\\temp\\two.txt") > seconds=0 > lastminute=0 > array.each{|row| > minute=row[1].split(":")[1].to_i > puts minute > puts lastminute > if(minute =lastminute) then > puts "same as last minute" > seconds=seconds+1 > end if > } > > You have an extra `if' after the last `end'. Su