Line 22:
@file.each do |line|

is missing "end"

-- 
Posted via http://www.ruby-forum.com/.