Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

BigDecimal#_dump

_dump → string

Returns a string representing the marshalling of self. See module Marshal.

Example
inf = BigDecimal('Infinity') # => Infinity
dumped = inf._dump           # => "9:Infinity"
BigDecimal._load(dumped)     # => Infinity
See also #divmod #dup #div #eql? also in 3.3 · 3.1 · 3.0