Skip to content

Update test_bigdecimal.rb and fix a few failures#7897

Merged
enebo merged 7 commits intojruby:masterfrom
k77ch7:ruby-3.1-fix-bigdecimal-latest
Aug 20, 2023
Merged

Update test_bigdecimal.rb and fix a few failures#7897
enebo merged 7 commits intojruby:masterfrom
k77ch7:ruby-3.1-fix-bigdecimal-latest

Conversation

@k77ch7
Copy link
Contributor

@k77ch7 k77ch7 commented Aug 20, 2023

This PR updates test_bigdecimal.rb from bigdecimal v3.1.4.
And this PR fixes a few failures.

  • BigDecimal#remainder with Infinity
  • The exception message in BigDecimal#round with invalid round mode

I believe that this implementation enhances JRuby's compatibility. However, please note that an exclusion tag has been added.

k77ch7 added 7 commits August 20, 2023 19:25
The following tests will pass.
 * test_round_half_invalid_option in test/mri/bigdecimal/test_bigdecimal.rb
 * spec/ruby/library/bigdecimal/round_spec.rb
BigDecimal#remainder with Infinity should return self.

The following test will pass
 * test_reminder_infinity_gh_187 in test/mri/bigdecimal/test_bigdecimal.rb
@enebo enebo added this to the JRuby 9.4.4.0 milestone Aug 20, 2023
@enebo enebo merged commit 6934f06 into jruby:master Aug 20, 2023
@enebo
Copy link
Member

enebo commented Aug 20, 2023

@k77ch7 I think that is ok but it is always hard to know what people actually hit in these libraries.

@k77ch7
Copy link
Contributor Author

k77ch7 commented Aug 20, 2023

@enebo I feel the same.

By the way, do you have any plans to gemify JRuby's BigDecimal implementation?
If you do, I think it would be preferable to reduce the number of failure/exclusion tags.
I suppose that fixing the remaining failures could be a challenging problem.

@enebo
Copy link
Member

enebo commented Aug 21, 2023

@k77ch7 no current plans but it should probably eventually be that way to match up with the other gems C Ruby also gemifies.

@k77ch7
Copy link
Contributor Author

k77ch7 commented Aug 22, 2023

@enebo Thanks again.

@enebo
Copy link
Member

enebo commented Aug 22, 2023

@k77ch7 I just going to 👍 this but you are the one who needs thanking. Bigdecimal would not be where it is today without your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants