Sha256: c29ced88045e1ed8e3bef38a4b4c686572779b3c6e174ed57376805044da7e21
Contents?: true
Size: 286 Bytes
Versions: 23
Compression:
Stored size: 286 Bytes
Contents
class Numeric if instance_method(:round).arity.zero? def round_with_digits(ndigits=0) ndigits = Backports::coerce_to_int(ndigits) ndigits.zero? ? round_without_digits : Float(self).round(ndigits) end Backports.alias_method_chain self, :round, :digits end end
Version data entries
23 entries across 23 versions & 2 rubygems