From: Christer Nilsson Date: 2005-12-31T10:44:31+09:00 Subject: Re: Another Newb asks questions. Joseph Divelbiss wrote: > Wilson Bilkovich wrote: >> if file.lineno % 2 == 1 then > > I hope youll forgive, but I seem to be at a loss for exactly what/how > this is doing..? > > Any clarification? > > Yeah this is my first language, first project, first week; so label me > silly. It seems to check if the line number is odd. % is the modulo operator. class Integer def odd? self % 2 == 1 end end ... if file.lineno.odd? then ... we have all been in your situation :-) Christer -- Posted via http://www.ruby-forum.com/.