Regression introduced in Crystal 0.31.0 (#8120)
require "big"
"-100.000".to_big_d.to_big_i # => -100000
Before: https://carc.in/#/r/8jrq
After: https://carc.in/#/r/8jro
/cc @bcardiff
Other broken case: "-1.1".to_big_d.to_big_i # => -10
. #8790 doesn't fix this.
@straight-shoota Force-pushed amended commit with the fix.
I scheduled the PR for 0.34.0. It could not review it yet.
Would've been nice to include it in 0.33.0 since it's already fixed. But I guess it's fine.
@bcardiff It's been reviewed already and there are tests, so why hold it back...? :/
@straight-shoota Thanks for merging! I guess it should have the 0.34.0
milestone added too.
Usually only PRs are milestoned (see previous ones) to keep the noise down. Both PR and issue relate to the same bug or feature and we only need to have one representation in the milestone.
@straight-shoota Good to know, makes sense! I got mistaken by this:
Most helpful comment
Other broken case:
"-1.1".to_big_d.to_big_i # => -10
. #8790 doesn't fix this.