Sha256: 3cec735d998ef6a1df9f997186d6c75c1b189544230ca89f6935ffaf398d439e
Contents?: true
Size: 457 Bytes
Versions: 3
Compression:
Stored size: 457 Bytes
Contents
require "bigdecimal" if (BigDecimal.instance_methods & ["to_d", :to_d]).empty? BigDecimal.class_eval do def to_d #:nodoc: self end end end if (Bignum.instance_methods & ["to_d", :to_d]).empty? Bignum.class_eval do def to_d #:nodoc: BigDecimal.new(self.to_s) end end end if (Fixnum.instance_methods & ["to_d", :to_d]).empty? Fixnum.class_eval do def to_d #:nodoc: BigDecimal.new(self.to_s) end end end
Version data entries
3 entries across 3 versions & 1 rubygems