Skip to content

Upgrading bigdecimal 3 to 4

Breaking3.3.1 → 4.1.3Breaking2Security1Deprecated1New7Changed19Fixed22Other31

BreakingUpgrade verdict

2 breaking changes and a security fix.

  • A build option that let String values be converted to numbers automatically is gone.
  • The old precs method on BigDecimal numbers is gone, so code calling it will fail.
  • Closes a memory corruption bug that could be triggered by division.
  • Three older math routines are marked deprecated and should be avoided in new code.
4 items need code or config changes

Ruby requirement changed in 4.1.0: >= 2.5.0 → >= 2.6.0.

Breaking2
Removes the ENABLE_NUMERIC_STRING compile-time flag.
ENABLE_NUMERIC_STRING
Removes deprecated method BigDecimal#precs.
BigDecimal#precs
Security1
Fixes an out-of-bounds write in Newton-Raphson division and improves normalize.
normalize
Deprecated1
Deprecates ludcmp, jacobian and newton.
ludcmpjacobiannewton