From: Haze Noc Date: 2007-08-14T02:04:55+09:00 Subject: Re: Returning argument as a number problem Sebastian Hungerecker wrote: > Haze Noc wrote: >> Hey guys, I have a method as such: >> >> def random(len) >> if len !~ /\d+/ >> pub_send "Invalid number" > > Are you aware that if len is a number this will always be true (and it > would > be true no matter what regex you use). > > Yeah i realized that after i got it working, Wasn't thinking straight, it wouldn't work unless there was a number so there was no need for the regex at all, thanks again -- Posted via http://www.ruby-forum.com/.