From: Mark Van Holstyn Date: 2006-10-26T08:21:33+09:00 Subject: Re: simple math question ------=_Part_13782_22476024.1161818489433 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline number % 2 == 0 #even number % 2 == 1 #odd Mark On 10/25/06, Brad Tilley wrote: > > What's the quickest way to determine if an int is an even number > 2,4,6,8... > Anything such as int.even or int.odd returning true/false? I want to > test the length of an array and add one element to it if it has an odd > number of elements. > > Thank you! > > -- > Posted via http://www.ruby-forum.com/. > > -- Mark Van Holstyn mvette13@gmail.com http://lotswholetime.com ------=_Part_13782_22476024.1161818489433--