File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2459,14 +2459,15 @@ BigDecimal_fix(VALUE self)
2459
2459
* round(n, mode)
2460
2460
*
2461
2461
* Round to the nearest integer (by default), returning the result as a
2462
- * BigDecimal if n is specified, or as an Integer if it isn't.
2462
+ * BigDecimal if n is specified and positive , or as an Integer if it isn't.
2463
2463
*
2464
2464
* BigDecimal('3.14159').round #=> 3
2465
2465
* BigDecimal('8.7').round #=> 9
2466
2466
* BigDecimal('-9.9').round #=> -10
2467
2467
*
2468
2468
* BigDecimal('3.14159').round(2).class.name #=> "BigDecimal"
2469
2469
* BigDecimal('3.14159').round.class.name #=> "Integer"
2470
+ * BigDecimal('3.14159').round(0).class.name #=> "Integer"
2470
2471
*
2471
2472
* If n is specified and positive, the fractional part of the result has no
2472
2473
* more than that many digits.
You can’t perform that action at this time.
0 commit comments