The formatting of BigDecimal and Rational numbers by calling to_f messes up the precision of the numbers displayed, thus misleading the user as to the value of the number being shown. In example:
This patch addresses that issue by pre-formatting BigDecimal and Rationals with to_s before calling colorize to ensure that all precision is preserved in the output.
The formatting of BigDecimal and Rational numbers by calling to_f messes up the precision of the numbers displayed, thus misleading the user as to the value of the number being shown. In example:
This patch addresses that issue by pre-formatting BigDecimal and Rationals with to_s before calling colorize to ensure that all precision is preserved in the output.