Skip to content
New issue

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

Enhanced RDoc for bigdecimal.c #195

Merged
merged 6 commits into from
Nov 17, 2021
Merged

Enhanced RDoc for bigdecimal.c #195

merged 6 commits into from
Nov 17, 2021

Conversation

BurdetteLamar
Copy link
Member

Treats:

  • ::double_fig
  • #precision
  • #precs
  • #_dump
  • ::mode

@BurdetteLamar
Copy link
Member Author

This PR should have a documentation label, but that label does not (yet) exist.

Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for improving the Ruby documentation!

I read the whole changeset and only saw a single tiny detail which I made an inline question about.

I recommend a merge.

* BigDecimal("1e-20").precision # => 20
* BigDecimal("Infinity").precision # => 0
* BigDecimal("-Infinity").precision # => 0
* BigDecimal("NaN").precision # => 0
Copy link
Member

@mrkn mrkn Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the previous format in the output example. Please revert this part.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@mrkn mrkn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left two additional comments.

ext/bigdecimal/bigdecimal.c Outdated Show resolved Hide resolved
ext/bigdecimal/bigdecimal.c Outdated Show resolved Hide resolved
ext/bigdecimal/bigdecimal.c Outdated Show resolved Hide resolved
@BurdetteLamar
Copy link
Member Author

@mrkn, ready for review.

Copy link
Member

@mrkn mrkn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found more additional points to be confirmed. Could you check them?

ext/bigdecimal/bigdecimal.c Outdated Show resolved Hide resolved
ext/bigdecimal/bigdecimal.c Show resolved Hide resolved
* if the neighbors are equidistant, round away from zero.
* Aliased as +:half_up+ and +:default+.
* - +ROUND_HALF_DOWN+: Round toward the nearer neighbor;
* if the neighbors are equidistant, round toward from zero.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove from before zero.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@BurdetteLamar
Copy link
Member Author

@mrkn, I'm not positive I've addressed all your points. Can you confirm?

@BurdetteLamar
Copy link
Member Author

@mrkn, is this ready to merge?

@mrkn
Copy link
Member

mrkn commented Nov 17, 2021

@BurdetteLamar Thank you very much!

@mrkn mrkn merged commit f528a00 into ruby:master Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants