logo       

Re: `+': Range can't be coerced into Fixnum (TypeError): msg#02385

ruby-talk

Subject: Re: `+': Range can't be coerced into Fixnum (TypeError)

P.S. It's not normal ruby practice to return 0 or 1 for boolean
conditions. You should return false (or nil), and true (or any value
other than nil or false)

Then you can say:

if check

rather than

if check == 1

Regards,

Brian.
--
Posted via http://www.ruby-forum.com/.

Google Custom Search

News | Mail Home | sitemap | FAQ | advertise