ruby-changes:13260
From: marcandre <ko1@a...>
Date: Tue, 22 Sep 2009 02:47:31 +0900 (JST)
Subject: [ruby-changes:13260] Ruby:r25021 (ruby_1_8): * numeric.c: Fix doc for #remainder
marcandre 2009-09-22 02:46:59 +0900 (Tue, 22 Sep 2009) New Revision: 25021 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25021 Log: * numeric.c: Fix doc for #remainder [ruby-core:18796] * ext/bigdecimal/bigdecimal.c: ditto Modified files: branches/ruby_1_8/ext/bigdecimal/bigdecimal.c branches/ruby_1_8/numeric.c Index: ruby_1_8/ext/bigdecimal/bigdecimal.c =================================================================== --- ruby_1_8/ext/bigdecimal/bigdecimal.c (revision 25020) +++ ruby_1_8/ext/bigdecimal/bigdecimal.c (revision 25021) @@ -1069,10 +1069,7 @@ /* Returns the remainder from dividing by the value. * - * If the values divided are of the same sign, the remainder is the same as - * the modulus (see divmod). - * - * Otherwise, the remainder is the modulus minus the value divided by. + * <code>x.remainder(y)</code> means <code>x-y*(x/y).truncate.</code> */ static VALUE BigDecimal_remainder(VALUE self, VALUE r) /* remainder */ Index: ruby_1_8/numeric.c =================================================================== --- ruby_1_8/numeric.c (revision 25020) +++ ruby_1_8/numeric.c (revision 25021) @@ -366,11 +366,9 @@ * call-seq: * num.remainder(numeric) => result * - * If <i>num</i> and <i>numeric</i> have different signs, returns - * <em>mod</em>-<i>numeric</i>; otherwise, returns <em>mod</em>. In - * both cases <em>mod</em> is the value - * <i>num</i>.<code>modulo(</code><i>numeric</i><code>)</code>. The - * differences between <code>remainder</code> and modulo + * <code>x.remainder(y)</code> means <code>x-y*(x/y).truncate.</code> + * + * The differences between <code>remainder</code> and modulo * (<code>%</code>) are shown in the table under <code>Numeric#divmod</code>. */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/