aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-21 01:29:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-21 01:29:58 +0000
commitc9d7a6b9bf571df6484a26722402d605542dfb03 (patch)
treea2f166c727e01764941980bc6d0899099832933d /numeric.c
parenta6289135e9cc584389e9d5b17333c2f4bfa26d21 (diff)
downloadruby-c9d7a6b9bf571df6484a26722402d605542dfb03.tar.gz
numeric.c: rdoc of half option [ci skip]
* numeric.c (flo_round): [DOC] mention half option. [Bug #12548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index dabcdc39de..d68c54493f 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2223,6 +2223,12 @@ rb_int_truncate(VALUE num, int ndigits)
* 34567.89.round(2) #=> 34567.89
* 34567.89.round(3) #=> 34567.89
*
+ * If <code>half:</code> optional keyword is given, just-half number
+ * will be rounded according to that value. If it is
+ * <code>:up</code> or +nil+, the result will be rounded up, or it is
+ * <code>:even</code>, the result will be rounded to nearest even
+ * number, or it is <code>:down</code>, the result will be rounded
+ * down.
*/
static VALUE