[ruby/bigdecimal] Set rounding mode in example

https://github.com/ruby/bigdecimal/commit/8fc83dd2fe
This commit is contained in:
BurdetteLamar 2021-11-25 10:42:34 -06:00 committed by Kenta Murata
parent a8243d07e1
commit 0c63aa11bc
No known key found for this signature in database
GPG Key ID: CEFE8AFB6081B062

View File

@ -1892,7 +1892,7 @@ BigDecimal_div3(int argc, VALUE *argv, VALUE self)
* Examples:
*
* # Set the rounding mode.
* BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_HALF_UP)
* BigDecimal.mode(BigDecimal::ROUND_MODE, :half_up)
* BigDecimal('111111.111').add(1, 0) # => 0.111112111e6
* BigDecimal('111111.111').add(1, 2) # => 0.11e6
* BigDecimal('111111.111').add(1, 3) # => 0.111e6