We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
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
This is on JRuby master (pre-9.1.6.0).
[] ~/projects/rails/activesupport $ jruby -e "p 1.0e-100" 0.0 [] ~/projects/rails/activesupport $ ruby23 -e "p 1.0e-100" 1.0e-100
I confirmed the proper value does make it into the Float object, but when we to_s we're losing information.
This is used by Rails in their NumberToRoundedConverter: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb#L63
NumberToRoundedConverter
As a result of us to_s'ing this value, we end up with a 0.0 multiplier. This breaks tests in Rails activesupport/test/number_helper_test.rb here: https://github.com/rails/rails/blob/master/activesupport/test/number_helper_test.rb#L195
The text was updated successfully, but these errors were encountered:
I'm also seeing test_sprintf_float failure on macOS and Ubuntu Xenial:
test_sprintf_float
Failure: test_sprintf_float(TestKernel) /home/ubuntu/jruby/test/jruby/test_kernel.rb:405:in `test_sprintf_float' 402: # JRUBY-4802 403: def test_sprintf_float 404: assert_equal "0.00000", Kernel.sprintf("%.5f", 0.000004) => 405: assert_equal "0.00001", Kernel.sprintf("%.5f", 0.000005) 406: assert_equal "0.00001", Kernel.sprintf("%.5f", 0.000006) 407: end 408: <"0.00001"> expected but was <"0.00000">
Sorry, something went wrong.
this is now working on 9.2 as well as 9.1.16.0 :
jruby-9.1.16.0 :010 > p 1.0e-100 1.0e-100 => 1.0e-100
No branches or pull requests
This is on JRuby master (pre-9.1.6.0).
I confirmed the proper value does make it into the Float object, but when we to_s we're losing information.
This is used by Rails in their
NumberToRoundedConverter
: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb#L63As a result of us to_s'ing this value, we end up with a 0.0 multiplier. This breaks tests in Rails activesupport/test/number_helper_test.rb here: https://github.com/rails/rails/blob/master/activesupport/test/number_helper_test.rb#L195
The text was updated successfully, but these errors were encountered: