Also since you are not just comparing lines but also row numbers, you 
can't use

case lines
when ...
when ...
end

I guess you should stick with the if elsif ... end
-- 
Posted via http://www.ruby-forum.com/.