Luis Masuelli Luis Masuelli - 1 year ago 92
Ruby Question

What is the meaning of this Decimal representation in ruby?

The number is this:


If I print it, it is:
. What is the meaning of the
(perhaps memory address?) and the

Answer Source

There's no need to guess when we have documentation for BigDecimal#inspect!


Returns debugging information about the value as a string of comma-separated values in angle brackets with a leading #:"1234.5678").inspect
#=> "#<BigDecimal:b7ea1130,'0.12345678E4',8(12)>"

The first part is the address, the second is the value as a string, and the final part ss(mm) is the current number of significant digits and the maximum number of significant digits, respectively.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download