From: Bill Kelly Date: 2006-10-26T08:21:18+09:00 Subject: Re: simple math question From: "Brad Tilley" > > 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. class Integer def even? (self & 1) == 0 end end Hope this helps, Bill