Class: BigDecimal

Inherits:
Object show all
Defined in:
motion/core_ext/object/duplicable.rb

Instance Method Summary collapse

Instance Method Details

#duplicable?Boolean

BigDecimals are not duplicable:

BigDecimal.new('4.56').duplicable? # => false
BigDecimal.new('4.56').dup         # => TypeError: can't dup Fixnum

Returns:

  • (Boolean)


84
85
86
# File 'motion/core_ext/object/duplicable.rb', line 84

def duplicable?
  false
end