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 selected methods #204

Merged
merged 4 commits into from
Nov 25, 2021
Merged

Enhanced RDoc for selected methods #204

merged 4 commits into from
Nov 25, 2021

Conversation

BurdetteLamar
Copy link
Member

Treated:

  • #+@
  • #add
  • #+

A couple of things I've made consistent with usage over at ruby/ruby:

  • The second argument to add, I've called ndigits.
  • I've placed the RDoc for the methods immediately before the code, so that Document-method is not needed.

I also discovered that + and add are different, and have documented them separately.

@BurdetteLamar
Copy link
Member Author

@mrkn, I don't want to put up anything more until you've had a chance to comment on this PR. That will give me good guidance going forward.

*
* Examples:
*
* BigDecimal('111111.111').add(1, 0) # => 0.111112111e6
Copy link
Member

Choose a reason for hiding this comment

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

@BurdetteLamar Could you please add the line to specify the rounding mode explicitly before this line?

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 Nov 25, 2021

Choose a reason for hiding this comment

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

@BurdetteLamar Could you please use :half_up instead of BigDecimal::ROUND_HALF_UP because I want to promote using a symbol instead of a constant?

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. But I have used :half_up (the default) because that's how the examples were made.

By the way, I strongly agree that the symbol is better.

@BurdetteLamar
Copy link
Member Author

@mrkn, is this ready to merge?

@mrkn
Copy link
Member

mrkn commented Nov 25, 2021

Thank you very much.

@mrkn mrkn merged commit 8fc83dd into ruby:master Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants