[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Class of numeric literals

KM

4/11/2007 3:46:00 PM

A literal number with a decimal point in it becomes a Float, e.g.

irb(main):002:0> 3.0.class
=> Float

Is there a way to make a literal like '3.0' become something else,
e.g. a BigDecimal, automatically?

--
KM