[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [SOLUTION] Ruby Quiz #14 LCD Numbers

email55555 email55555

1/9/2005 2:37:00 PM

My gmail send out with line wrap...
so some lines are true one line source code but wrapped.
The (http:// .... ) normally is part of previous line.
Same as (0..4).each ... etc is wrapped.

I do not do more error checking.
so any character not /\d/ will simply replace by zero.

of course, you could add parameter checking as you like like, for example

raise "number invalid" if number !~ /^\d+$/

Have Fun.