We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigRational#format
BigRational#format treats the entire string from #to_s as an integer, and then applies thousands separators over that directly:
#to_s
require "big" BigRational.new(100, 3).format # => "10,0/3" BigRational.new(1234567, 890123).format # => "12,345,67/,890,123"
This is entirely wrong. We have two options:
100/3
1,234,567/890,123
#to_f
33.33333333333333
1.386962251284373
#humanize is not affected, since it calls #format via #to_f rather than directly.
#humanize
#format
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
BigRational#format
treats the entire string from#to_s
as an integer, and then applies thousands separators over that directly:This is entirely wrong. We have two options:
100/3
and1,234,567/890,123
.#to_f
, giving33.33333333333333
and1.386962251284373
.#humanize
is not affected, since it calls#format
via#to_f
rather than directly.The text was updated successfully, but these errors were encountered: