Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. 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.2 · 3.1 · 3.0