ruby-changes:45057
From: nobu <ko1@a...>
Date: Wed, 21 Dec 2016 10:30:05 +0900 (JST)
Subject: [ruby-changes:45057] nobu:r57131 (trunk): numeric.c: rdoc of half option [ci skip]
nobu 2016-12-21 10:29:58 +0900 (Wed, 21 Dec 2016) New Revision: 57131 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57131 Log: numeric.c: rdoc of half option [ci skip] * numeric.c (flo_round): [DOC] mention half option. [Bug #12548] Modified files: trunk/numeric.c Index: numeric.c =================================================================== --- numeric.c (revision 57130) +++ numeric.c (revision 57131) @@ -2223,6 +2223,12 @@ rb_int_truncate(VALUE num, int ndigits) https://github.com/ruby/ruby/blob/trunk/numeric.c#L2223 * 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/