[前][次][番号順一覧][スレッド一覧]

ruby-changes:12076

From: tadf <ko1@a...>
Date: Fri, 19 Jun 2009 22:37:21 +0900 (JST)
Subject: [ruby-changes:12076] Ruby:r23746 (trunk): due to conflict

tadf	2009-06-19 22:37:04 +0900 (Fri, 19 Jun 2009)

  New Revision: 23746

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23746

  Log:
    due to conflict

  Modified files:
    trunk/ChangeLog
    trunk/numeric.c
    trunk/rational.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 23745)
+++ ChangeLog	(revision 23746)
@@ -1,3 +1,18 @@
+Fri Jun 19 22:21:17 2009  Tadayoshi Funaba  <tadf@d...>
+
+	* numeric.c: edited rdoc.
+
+Fri Jun 19 21:56:01 2009  Tadayoshi Funaba  <tadf@d...>
+
+	* rational.c (nurat_expt): delegates to complex when self is
+	  negative.  bacause Float#** does not produce complex.
+
+Fri Jun 19 21:40:58 2009  Tadayoshi Funaba  <tadf@d...>
+
+	* numeric.c: edited rdoc.
+
+	* rational.c: ditto.
+
 Fri Jun 19 20:53:54 2009  Yukihiro Matsumoto  <matz@r...>
 
 	* encoding.c (rb_enc_name_list): update RDoc.  [ruby-core:23926]
Index: numeric.c
===================================================================
--- numeric.c	(revision 23745)
+++ numeric.c	(revision 23746)
@@ -103,7 +103,7 @@
 
 /*
  *  call-seq:
- *     num.coerce(numeric)   => array
+ *     num.coerce(numeric)  =>  array
  *
  *  If <i>aNumeric</i> is the same type as <i>num</i>, returns an array
  *  containing <i>aNumeric</i> and <i>num</i>. Otherwise, returns an
@@ -225,7 +225,7 @@
 
 /*
  *  call-seq:
- *     +num    => num
+ *     +num  =>  num
  *
  *  Unary Plus---Returns the receiver's value.
  */
@@ -238,7 +238,7 @@
 
 /*
  *  call-seq:
- *     -num    => numeric
+ *     -num  =>  numeric
  *
  *  Unary Minus---Returns the receiver's value, negated.
  */
@@ -256,7 +256,7 @@
 
 /*
  *  call-seq:
- *     num.quo(numeric)    =>   result
+ *     num.quo(numeric)  =>  result
  *
  *  Returns most exact division (rational for integers, float for floats).
  */
@@ -270,7 +270,7 @@
 
 /*
  *  call-seq:
- *     num.fdiv(numeric)    =>   float
+ *     num.fdiv(numeric)  =>  float
  *
  *  Returns float division.
  */
@@ -286,11 +286,16 @@
 
 /*
  *  call-seq:
- *     num.div(numeric)    => integer
+ *     num.div(numeric)  =>  integer
  *
  *  Uses <code>/</code> to perform division, then converts the result to
- *  an integer. <code>Numeric</code> does not define the <code>/</code>
+ *  an integer. <code>numeric</code> does not define the <code>/</code>
  *  operator; this is left to subclasses.
+ *
+ *  Equivalent to
+ *  <i>num</i>.<code>divmod(</code><i>aNumeric</i><code>)[0]</code>.
+ *
+ *  See <code>Numeric#divmod</code>.
  */
 
 static VALUE
@@ -303,14 +308,14 @@
 
 /*
  *  call-seq:
- *     num.divmod( aNumeric ) -> anArray
+ *     num.divmod(numeric)  =>  array
  *
  *  Returns an array containing the quotient and modulus obtained by
- *  dividing <i>num</i> by <i>aNumeric</i>. If <code>q, r =
+ *  dividing <i>num</i> by <i>numeric</i>. If <code>q, r =
  *  x.divmod(y)</code>, then
  *
- *      q = floor(float(x)/float(y))
- *      x = q*y + r
+ *      q = floor(x/y)
+ *      x = q*y+r
  *
  *  The quotient is rounded toward -infinity, as shown in the following table:
  *
@@ -350,10 +355,14 @@
 
 /*
  *  call-seq:
- *     num.modulo(numeric)    => result
+ *     num.modulo(numeric)  =>  result
  *
+ *     x.modulo(y) means x-y*(x/y).floor
+ *
  *  Equivalent to
  *  <i>num</i>.<code>divmod(</code><i>aNumeric</i><code>)[1]</code>.
+ *
+ *  See <code>Numeric#divmod</code>.
  */
 
 static VALUE
@@ -364,14 +373,11 @@
 
 /*
  *  call-seq:
- *     num.remainder(numeric)    => result
+ *     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>%</code>) are shown in the table under <code>Numeric#divmod</code>.
+ *     x.remainder(y) means x-y*(x/y).truncate
+ *
+ *  See <code>Numeric#divmod</code>.
  */
 
 static VALUE
@@ -391,7 +397,7 @@
 
 /*
  *  call-seq:
- *     num.real? -> true or false
+ *     num.real?  =>  true or false
  *
  *  Returns <code>true</code> if <i>num</i> is a <code>Real</code>
  *  (i.e. non <code>Complex</code>).
@@ -405,7 +411,7 @@
 
 /*
  *  call-seq:
- *     num.integer? -> true or false
+ *     num.integer?  =>  true or false
  *
  *  Returns <code>true</code> if <i>num</i> is an <code>Integer</code>
  *  (including <code>Fixnum</code> and <code>Bignum</code>).
@@ -419,7 +425,7 @@
 
 /*
  *  call-seq:
- *     num.abs   => num or numeric
+ *     num.abs  =>  num or numeric
  *
  *  Returns the absolute value of <i>num</i>.
  *
@@ -440,7 +446,7 @@
 
 /*
  *  call-seq:
- *     num.zero?    => true or false
+ *     num.zero?  =>  true or false
  *
  *  Returns <code>true</code> if <i>num</i> has a zero value.
  */
@@ -457,7 +463,7 @@
 
 /*
  *  call-seq:
- *     num.nonzero?    => num or nil
+ *     num.nonzero?  =>  num or nil
  *
  *  Returns <i>num</i> if <i>num</i> is not zero, <code>nil</code>
  *  otherwise. This behavior is useful when chaining comparisons:
@@ -478,7 +484,7 @@
 
 /*
  *  call-seq:
- *     num.to_int    => integer
+ *     num.to_int  =>  integer
  *
  *  Invokes the child class's <code>to_i</code> method to convert
  *  <i>num</i> to an integer.
@@ -511,7 +517,7 @@
 
 /*
  *  call-seq:
- *     flt.to_s    => string
+ *     flt.to_s  =>  string
  *
  *  Returns a string containing a representation of self. As well as a
  *  fixed or exponential form of the number, the call may return
@@ -565,7 +571,7 @@
 
 /*
  * call-seq:
- *    -float   => float
+ *    -float  =>  float
  *
  * Returns float, negated.
  */
@@ -578,7 +584,7 @@
 
 /*
  * call-seq:
- *   float + other   => float
+ *   float + other  =>  float
  *
  * Returns a new float which is the sum of <code>float</code>
  * and <code>other</code>.
@@ -601,7 +607,7 @@
 
 /*
  * call-seq:
- *   float + other   => float
+ *   float + other  =>  float
  *
  * Returns a new float which is the difference of <code>float</code>
  * and <code>other</code>.
@@ -624,7 +630,7 @@
 
 /*
  * call-seq:
- *   float * other   => float
+ *   float * other  =>  float
  *
  * Returns a new float which is the product of <code>float</code>
  * and <code>other</code>.
@@ -647,7 +653,7 @@
 
 /*
  * call-seq:
- *   float / other   => float
+ *   float / other  =>  float
  *
  * Returns a new float which is the result of dividing
  * <code>float</code> by <code>other</code>.
@@ -710,8 +716,8 @@
 
 /*
  *  call-seq:
- *     flt % other         => float
- *     flt.modulo(other)   => float
+ *     flt % other        =>  float
+ *     flt.modulo(other)  =>  float
  *
  *  Return the modulo after division of <code>flt</code> by <code>other</code>.
  *
@@ -759,7 +765,7 @@
 
 /*
  *  call-seq:
- *     flt.divmod(numeric)    => array
+ *     flt.divmod(numeric)  =>  array
  *
  *  See <code>Numeric#divmod</code>.
  */
@@ -792,7 +798,7 @@
 /*
  * call-seq:
  *
- *  flt ** other   => float
+ *  flt ** other  =>  float
  *
  * Raises <code>float</code> the <code>other</code> power.
  */
@@ -814,7 +820,7 @@
 
 /*
  *  call-seq:
- *     num.eql?(numeric)    => true or false
+ *     num.eql?(numeric)  =>  true or false
  *
  *  Returns <code>true</code> if <i>num</i> and <i>numeric</i> are the
  *  same type and have equal values.
@@ -834,7 +840,7 @@
 
 /*
  *  call-seq:
- *     num <=> other -> 0 or nil
+ *     num <=> other  =>  0 or nil
  *
  *  Returns zero if <i>num</i> equals <i>other</i>, <code>nil</code>
  *  otherwise.
@@ -856,7 +862,7 @@
 
 /*
  *  call-seq:
- *     flt == obj   => true or false
+ *     flt == obj  =>  true or false
  *
  *  Returns <code>true</code> only if <i>obj</i> has the same value
  *  as <i>flt</i>. Contrast this with <code>Float#eql?</code>, which
@@ -896,7 +902,7 @@
 
 /*
  * call-seq:
- *   flt.hash   => integer
+ *   flt.hash  =>  integer
  *
  * Returns a hash code for this float.
  */
@@ -924,7 +930,7 @@
 
 /*
  *  call-seq:
- *     flt <=> numeric   => -1, 0, +1
+ *     flt <=> numeric  =>  -1, 0, +1
  *
  *  Returns -1, 0, or +1 depending on whether <i>flt</i> is less than,
  *  equal to, or greater than <i>numeric</i>. This is the basis for the
@@ -968,7 +974,7 @@
 
 /*
  * call-seq:
- *   flt > other    =>  true or false
+ *   flt > other  =>  true or false
  *
  * <code>true</code> if <code>flt</code> is greater than <code>other</code>.
  */
@@ -1006,7 +1012,7 @@
 
 /*
  * call-seq:
- *   flt >= other    =>  true or false
+ *   flt >= other  =>  true or false
  *
  * <code>true</code> if <code>flt</code> is greater than
  * or equal to <code>other</code>.
@@ -1045,7 +1051,7 @@
 
 /*
  * call-seq:
- *   flt < other    =>  true or false
+ *   flt < other  =>  true or false
  *
  * <code>true</code> if <code>flt</code> is less than <code>other</code>.
  */
@@ -1083,7 +1089,7 @@
 
 /*
  * call-seq:
- *   flt <= other    =>  true or false
+ *   flt <= other  =>  true or false
  *
  * <code>true</code> if <code>flt</code> is less than
  * or equal to <code>other</code>.
@@ -1122,7 +1128,7 @@
 
 /*
  *  call-seq:
- *     flt.eql?(obj)   => true or false
+ *     flt.eql?(obj)  =>  true or false
  *
  *  Returns <code>true</code> only if <i>obj</i> is a
  *  <code>Float</code> with the same value as <i>flt</i>. Contrast this
@@ -1148,7 +1154,7 @@
 
 /*
  * call-seq:
- *   flt.to_f   => flt
+ *   flt.to_f  =>  self
  *
  * As <code>flt</code> is already a float, returns <i>self</i>.
  */
@@ -1161,7 +1167,7 @@
 
 /*
  *  call-seq:
- *     flt.abs    => float
+ *     flt.abs  =>  float
  *
  *  Returns the absolute value of <i>flt</i>.
  *
@@ -1179,7 +1185,7 @@
 
 /*
  *  call-seq:
- *     flt.zero? -> true or false
+ *     flt.zero?  =>  true or false
  *
  *  Returns <code>true</code> if <i>flt</i> is 0.0.
  *
@@ -1196,7 +1202,7 @@
 
 /*
  *  call-seq:
- *     flt.nan? -> true or false
+ *     flt.nan?  =>  true or false
  *
  *  Returns <code>true</code> if <i>flt</i> is an invalid IEEE floating
  *  point number.
@@ -1217,7 +1223,7 @@
 
 /*
  *  call-seq:
- *     flt.infinite? -> nil, -1, +1
+ *     flt.infinite?  =>  nil, -1, +1
  *
  *  Returns <code>nil</code>, -1, or +1 depending on whether <i>flt</i>
  *  is finite, -infinity, or +infinity.
@@ -1241,7 +1247,7 @@
 
 /*
  *  call-seq:
- *     flt.finite? -> true or false
+ *     flt.finite?  =>  true or false
  *
  *  Returns <code>true</code> if <i>flt</i> is a valid IEEE floating
  *  point number (it is not infinite, and <code>nan?</code> is
@@ -1267,7 +1273,7 @@
 
 /*
  *  call-seq:
- *     flt.floor   => integer
+ *     flt.floor  =>  integer
  *
  *  Returns the largest integer less than or equal to <i>flt</i>.
  *
@@ -1292,7 +1298,7 @@
 
 /*
  *  call-seq:
- *     flt.ceil    => integer
+ *     flt.ceil  =>  integer
  *
  *  Returns the smallest <code>Integer</code> greater than or equal to
  *  <i>flt</i>.
@@ -1318,7 +1324,7 @@
 
 /*
  *  call-seq:
- *     flt.round([ndigits])   => integer or float
+ *     flt.round([ndigits])  =>  integer or float
  *
  *  Rounds <i>flt</i> to a given precision in decimal digits (default 0 digits).
  *  Precision may be negative.  Returns a a floating point number when ndigits
@@ -1367,9 +1373,9 @@
 
 /*
  *  call-seq:
- *     flt.to_i       => integer
- *     flt.to_int     => integer
- *     flt.truncate   => integer
+ *     flt.to_i      =>  integer
+ *     flt.to_int    =>  integer
+ *     flt.truncate  =>  integer
  *
  *  Returns <i>flt</i> truncated to an <code>Integer</code>.
  */
@@ -1392,7 +1398,7 @@
 
 /*
  *  call-seq:
- *     num.floor    => integer
+ *     num.floor  =>  integer
  *
  *  Returns the largest integer less than or equal to <i>num</i>.
  *  <code>Numeric</code> implements this by converting <i>anInteger</i>
@@ -1411,7 +1417,7 @@
 
 /*
  *  call-seq:
- *     num.ceil    => integer
+ *     num.ceil  =>  integer
  *
  *  Returns the smallest <code>Integer</code> greater than or equal to
  *  <i>num</i>. Class <code>Numeric</code> achieves this by converting
@@ -1432,7 +1438,7 @@
 
 /*
  *  call-seq:
- *     num.round([ndigits])    => integer or float
+ *     num.round([ndigits])  =>  integer or float
  *
  *  Rounds <i>num</i> to a given precision in decimal digits (default 0 digits).
  *  Precision may be negative.  Returns a a floating point number when ndigits
@@ -1448,7 +1454,7 @@
 
 /*
  *  call-seq:
- *     num.truncate    => integer
+ *     num.truncate  =>  integer
  *
  *  Returns <i>num</i> truncated to an integer. <code>Numeric</code>
  *  implements this by converting its value to a float and invoking
@@ -1492,7 +1498,7 @@
 
 /*
  *  call-seq:
- *     num.step(limit, step ) {|i| block }     => num
+ *     num.step(limit, step ) {|i| block }  =>  self
  *
  *  Invokes <em>block</em> with the sequence of numbers starting at
  *  <i>num</i>, incremented by <i>step</i> on each call. The loop
@@ -1788,12 +1794,12 @@
 
 /*
  *  call-seq:
- *     int.to_i      => int
- *     int.to_int    => int
- *     int.floor     => int
- *     int.ceil      => int
- *     int.round     => int
- *     int.truncate  => int
+ *     int.to_i      =>  int
+ *     int.to_int    =>  int
+ *     int.floor     =>  int
+ *     int.ceil      =>  int
+ *     int.round     =>  int
+ *     int.truncate  =>  int
  *
  *  As <i>int</i> is already an <code>Integer</code>, all these
  *  methods simply return the receiver.
@@ -1807,7 +1813,7 @@
 
 /*
  *  call-seq:
- *     int.integer? -> true
+ *     int.integer?  =>  true
  *
  *  Always returns <code>true</code>.
  */
@@ -1820,7 +1826,7 @@
 
 /*
  *  call-seq:
- *     int.odd? -> true or false
+ *     int.odd?  =>  true or false
  *
  *  Returns <code>true</code> if <i>int</i> is an odd number.
  */
@@ -1836,7 +1842,7 @@
 
 /*
  *  call-seq:
- *     int.even? -> true or false
+ *     int.even?  =>  true or false
  *
  *  Returns <code>true</code> if <i>int</i> is an even number.
  */
@@ -1852,8 +1858,8 @@
 
 /*
  *  call-seq:
- *     fixnum.next    => integer
- *     fixnum.succ    => integer
+ *     fixnum.next  =>  integer
+ *     fixnum.succ  =>  integer
  *
  *  Returns the <code>Integer</code> equal to <i>int</i> + 1.
  *
@@ -1870,8 +1876,8 @@
 
 /*
  *  call-seq:
- *     int.next    => integer
- *     int.succ    => integer
+ *     int.next  =>  integer
+ *     int.succ  =>  integer
  *
  *  Returns the <code>Integer</code> equal to <i>int</i> + 1.
  *
@@ -1891,7 +1897,7 @@
 
 /*
  *  call-seq:
- *     int.pred    => integer
+ *     int.pred  =>  integer
  *
  *  Returns the <code>Integer</code> equal to <i>int</i> - 1.
  *
@@ -1911,7 +1917,7 @@
 
 /*
  *  call-seq:
- *     int.chr([encoding])    => string
+ *     int.chr([encoding])  =>  string
  *
  *  Returns a string containing the character represented by the
  *  receiver's value according to +encoding+.
@@ -1962,7 +1968,7 @@
 
 /*
  *  call-seq:
- *     int.ord    => int
+ *     int.ord  =>  self
  *
  *  Returns the int itself.
  *
@@ -2001,7 +2007,7 @@
 
 /*
  * call-seq:
- *   -fix   =>  integer
+ *   -fix  =>  integer
  *
  * Negates <code>fix</code> (which might return a Bignum).
  */
@@ -2043,7 +2049,7 @@
 
 /*
  *  call-seq:
- *     fix.to_s( base=10 ) -> aString
+ *     fix.to_s(base=10)  =>  string
  *
  *  Returns a string containing the representation of <i>fix</i> radix
  *  <i>base</i> (between 2 and 36).
@@ -2074,7 +2080,7 @@
 
 /*
  * call-seq:
- *   fix + numeric   =>  numeric_result
+ *   fix + numeric  =>  numeric_result
  *
  * Performs addition: the class of the resulting object depends on
  * the class of <code>numeric</code> and on the magnitude of the
@@ -2107,7 +2113,7 @@
 
 /*
  * call-seq:
- *   fix - numeric   =>  numeric_result
+ *   fix - numeric  =>  numeric_result
  *
  * Performs subtraction: the class of the resulting object depends on
  * the class of <code>numeric</code> and on the magnitude of the
@@ -2145,7 +2151,7 @@
 
 /*
  * call-seq:
- *   fix * numeric   =>  numeric_result
+ *   fix * numeric  =>  numeric_result
  *
  * Performs multiplication: the class of the resulting object depends on
  * the class of <code>numeric</code> and on the magnitude of the
@@ -2227,7 +2233,7 @@
 
 /*
  *  call-seq:
- *     fix.fdiv(numeric)   => float
+ *     fix.fdiv(numeric)  =>  float
  *
  *  Returns the floating point result of dividing <i>fix</i> by
  *  <i>numeric</i>.
@@ -2289,7 +2295,7 @@
 
 /*
  * call-seq:
- *   fix / numeric      =>  numeric_result
+ *   fix / numeric  =>  numeric_result
  *
  * Performs division: the class of the resulting object depends on
  * the class of <code>numeric</code> and on the magnitude of the
@@ -2304,7 +2310,7 @@
 
 /*
  * call-seq:
- *   fix.div(numeric)   =>  numeric_result
+ *   fix.div(numeric)  =>  integer
  *
  * Performs integer division: returns integer value.
  */
@@ -2317,11 +2323,11 @@
 
 /*
  *  call-seq:
- *    fix % other         => Numeric
- *    fix.modulo(other)   => Numeric
+ *    fix % other        =>  numeric
+ *    fix.modulo(other)  =>  numeric
  *
  *  Returns <code>fix</code> modulo <code>other</code>.
- *  See <code>Numeric.divmod</code> for more information.
+ *  See <code>numeric.divmod</code> for more information.
  */
 
 static VALUE
@@ -2351,7 +2357,7 @@
 
 /*
  *  call-seq:
- *     fix.divmod(numeric)    => array
+ *     fix.divmod(numeric)  =>  array
  *
  *  See <code>Numeric#divmod</code>.
  */
@@ -2424,7 +2430,7 @@
 
 /*
  *  call-seq:
- *    fix ** other         => Numeric
+ *    fix ** other  =>  numeric
  *
  *  Raises <code>fix</code> to the <code>other</code> power, which may
  *  be negative or fractional.
@@ -2488,7 +2494,7 @@
 
 /*
  * call-seq:
- *   fix == other
+ *   fix == other  =>  true or false
  *
  * Return <code>true</code> if <code>fix</code> equals <code>other</code>
  * numerically.
@@ -2514,7 +2520,7 @@
 
 /*
  *  call-seq:
- *     fix <=> numeric    => -1, 0, +1
+ *     fix <=> numeric  =>  -1, 0, +1
  *
  *  Comparison---Returns -1, 0, or +1 depending on whether <i>fix</i> is
  *  less than, equal to, or greater than <i>numeric</i>. This is the
@@ -2541,7 +2547,7 @@
 
 /*
  * call-seq:
- *   fix > other     => true or false
+ *   fix > other  =>  true or false
  *
  * Returns <code>true</code> if the value of <code>fix</code> is
  * greater than that of <code>other</code>.
@@ -2566,7 +2572,7 @@
 
 /*
  * call-seq:
- *   fix >= other     => true or false
+ *   fix >= other  =>  true or false
  *
  * Returns <code>true</code> if the value of <code>fix</code> is
  * greater than or equal to that of <code>other</code>.
@@ -2591,7 +2597,7 @@
 
 /*
  * call-seq:
- *   fix < other     => true or false
+ *   fix < other  =>  true or false
  *
  * Returns <code>true</code> if the value of <code>fix</code> is
  * less than that of <code>other</code>.
@@ -2616,7 +2622,7 @@
 
 /*
  * call-seq:
- *   fix <= other     => true or false
+ *   fix <= other  =>  true or false
  *
  * Returns <code>true</code> if the value of <code>fix</code> is
  * less than or equal to that of <code>other</code>.
@@ -2641,7 +2647,7 @@
 
 /*
  * call-seq:
- *   ~fix     => integer
+ *   ~fix  =>  integer
  *
  * One's complement: returns a number where each bit is flipped.
  */
@@ -2669,7 +2675,7 @@
 
 /*
  * call-seq:
- *   fix & other     => integer
+ *   fix & other  =>  integer
  *
  * Bitwise AND.
  */
@@ -2688,7 +2694,7 @@
 
 /*
  * call-seq:
- *   fix | other     => integer
+ *   fix | other  =>  integer
  *
  * Bitwise OR.
  */
@@ -2707,7 +2713,7 @@
 
 /*
  * call-seq:
- *   fix ^ other     => integer
+ *   fix ^ other  =>  integer
  *
  * Bitwise EXCLUSIVE OR.
  */
@@ -2729,7 +2735,7 @@
 
 /*
  * call-seq:
- *   fix << count     => integer
+ *   fix << count  =>  integer
  *
  * Shifts _fix_ left _count_ positions (right if _count_ is negative).
  */
@@ -2761,7 +2767,7 @@
 
 /*
  * call-seq:
- *   fix >> count     => integer
+ *   fix >> count  =>  integer
  *
  * Shifts _fix_ right _count_ positions (left if _count_ is negative).
  */
@@ -2794,7 +2800,7 @@
 
 /*
  *  call-seq:
- *     fix[n]     => 0, 1
+ *     fix[n]  =>  0, 1
  *
  *  Bit Reference---Returns the <em>n</em>th bit in the binary
  *  representation of <i>fix</i>, where <i>fix</i>[0] is the least
@@ -2837,7 +2843,7 @@
 
 /*
  *  call-seq:
- *     fix.to_f -> float
+ *     fix.to_f  =>  float
  *
  *  Converts <i>fix</i> to a <code>Float</code>.
  *
@@ -2855,7 +2861,7 @@
 
 /*
  *  call-seq:
- *     fix.abs -> aFixnum
+ *     fix.abs  =>  fix
  *
  *  Returns the absolute value of <i>fix</i>.
  *
@@ -2878,7 +2884,7 @@
 
 /*
  *  call-seq:
- *     fix.size -> fixnum
+ *     fix.size  =>  fixnum
  *
  *  Returns the number of <em>bytes</em> in the machine representation
  *  of a <code>Fixnum</code>.
@@ -2896,7 +2902,7 @@
 
 /*
  *  call-seq:
- *     int.upto(limit) {|i| block }     => int
+ *     int.upto(limit) {|i| block }  =>  self
  *
  *  Iterates <em>block</em>, passing in integer values from <i>int</i>
  *  up to and including <i>limit</i>.
@@ -2934,7 +2940,7 @@
 
 /*
  *  call-seq:
- *     int.downto(limit) {|i| block }     => int
+ *     int.downto(limit) {|i| block }  =>  self
  *
  *  Iterates <em>block</em>, passing decreasing values from <i>int</i>
  *  down to and including <i>limit</i>.
@@ -2973,7 +2979,7 @@
 
 /*
  *  call-seq:
- *     int.times {|i| block }     => int
+ *     int.times {|i| block }  =>  self
  *
  *  Iterates block <i>int</i> times, passing in values from zero to
  *  <i>int</i> - 1.
@@ -3051,7 +3057,7 @@
 
 /*
  *  call-seq:
- *     fix.zero?    => true or false
+ *     fix.zero?  =>  true or false
  *
  *  Returns <code>true</code> if <i>fix</i> is zero.
  *
@@ -3068,7 +3074,7 @@
 
 /*
  *  call-seq:
- *     fix.odd? -> true or false
+ *     fix.odd?  =>  true or false
  *
  *  Returns <code>true</code> if <i>fix</i> is an odd number.
  */
@@ -3084,7 +3090,7 @@
 
 /*
  *  call-seq:
- *     fix.even? -> true or false
+ *     fix.even?  =>  true or false
  *
  *  Returns <code>true</code> if <i>fix</i> is an even number.
  */
Index: rational.c
===================================================================
--- rational.c	(revision 23745)
+++ rational.c	(revision 23746)
@@ -510,12 +510,12 @@
 
 /*
  * call-seq:
- *   rat.numerator   =>  integer
- * 
+ *   rat.numerator  =>  integer
+ *
  * Returns the numerator of _rat_ as an +Integer+ object.
  *
  * For example:
- * 
+ *
  *     Rational(7).numerator         #=> 7
  *     Rational(7, 1).numerator      #=> 7
  *     Rational(4.3, 40.3).numerator #=> 4841369599423283
@@ -529,16 +529,15 @@
     return dat->num;
 }
 
-
 /*
  * call-seq:
- *   rat.denominator   =>  integer
- * 
+ *   rat.denominator  =>  integer
+ *
  * Returns the denominator of _rat_ as an +Integer+ object. If _rat_ was
  * created without an explicit denominator, +1+ is returned.
  *
  * For example:
- * 
+ *
  *     Rational(7).denominator         #=> 1
  *     Rational(7, 1).denominator      #=> 1
  *     Rational(4.3, 40.3).denominator #=> 45373766245757744
@@ -639,7 +638,7 @@
 
 /*
  * call-seq:
- *   rat + numeric   =>  numeric_result
+ *   rat + numeric  =>  numeric_result
  *
  * Performs addition. The class of the resulting object depends on
  * the class of _numeric_ and on the magnitude of the
@@ -687,10 +686,10 @@
 
 /*
  * call-seq:
- *   rat - numeric   =>  numeric_result
+ *   rat - numeric  =>  numeric_result
  *
  * Performs subtraction. The class of the resulting object depends on the
- * class of _numeric_ and on the magnitude of the result. 
+ * class of _numeric_ and on the magnitude of the result.
  *
  * A +TypeError+ is raised unless _numeric_ is a +Numeric+ object.
  *
@@ -772,10 +771,10 @@
 
 /*
  * call-seq:
- *   rat * numeric   =>  numeric_result
+ *   rat * numeric  =>  numeric_result
  *
  * Performs multiplication. The class of the resulting object depends on
- * the class of _numeric_ and on the magnitude of the result. 
+ * the class of _numeric_ and on the magnitude of the result.
  *
  * A +TypeError+ is raised unless _numeric_ is a +Numeric+ object.
  *
@@ -818,11 +817,11 @@
 
 /*
  * call-seq:
- *   rat / numeric    =>  numeric_result
- *   rat.quo(numeric) =>  numeric_result
+ *   rat / numeric     =>  numeric_result
+ *   rat.quo(numeric)  =>  numeric_result
  *
  * Performs division. The class of the resulting object depends on the class
- * of _numeric_ and on the magnitude of the result. 
+ * of _numeric_ and on the magnitude of the result.
  *
  * A +TypeError+ is raised unless _numeric_ is a +Numeric+ object. A
  * +ZeroDivisionError+ is raised if _numeric_ is 0.
@@ -872,10 +871,10 @@
 
 /*
  * call-seq:
- *   rat.fdiv(numeric)    =>  float
+ *   rat.fdiv(numeric)  =>  float
  *
  * Performs float division: dividing _rat_ by _numeric_. The return value is a
- * +Float+ object. 
+ * +Float+ object.
  *
  * A +TypeError+ is raised unless _numeric_ is a +Numeric+ object.
  *
@@ -895,7 +894,7 @@
 
 /*
  * call-seq:
- *   rat ** numeric   =>  numeric_result
+ *   rat ** numeric  =>  numeric_result
  *
  * Performs exponentiation, i.e. it raises _rat_ to the exponent _numeric_.
  * The class of the resulting object depends on the class of _numeric_ and on
@@ -906,7 +905,7 @@
  *
  *     Rational(2, 3)  ** Rational(2, 3)  #=> 0.7631428283688879
  *     Rational(900)   ** Rational(1)     #=> (900/1)
- *     Rational(-2, 9) ** Rational(-9, 2) #=> NaN
+ *     Rational(-2, 9) ** Rational(-9, 2) #=> (4.793639101185069e-13-869.8739233809262i)
  *     Rational(9, 8)  ** 4               #=> (6561/4096)
  *     Rational(20, 9) ** 9.8             #=> 2503.325740344559
  *     Rational(3, 2)  ** 2**3            #=> (6561/256)
@@ -952,6 +951,8 @@
 	}
       case T_FLOAT:
       case T_RATIONAL:
+	if (f_negative_p(self))
+	    return f_expt(rb_complex_new1(self), other); /* explicitly */
 	return f_expt(f_to_f(self), other);
       default:
 	return rb_num_coerce_bin(self, other, id_expt);
@@ -960,11 +961,11 @@
 
 /*
  * call-seq:
- *   rat <=> numeric   =>  -1, 0, +1
+ *   rat <=> numeric  =>  -1, 0, +1
  *
  * Performs comparison. Returns -1, 0, or +1 depending on whether _rat_ is
  * less than, equal to, or greater than _numeric_. This is the basis for the
- * tests in +Comparable+. 
+ * tests in +Comparable+.
  *
  * A +TypeError+ is raised unless _numeric_ is a +Numeric+ object.
  *
@@ -1018,7 +1019,7 @@
 
 /*
  * call-seq:
- *   rat == numeric   =>  +true+ or +false+
+ *   rat == numeric  =>  +true+ or +false+
  *
  * Tests for equality. Returns +true+ if _rat_ is equal to _numeric_; +false+
  * otherwise.
@@ -1071,7 +1072,7 @@
 
 /*
  * call-seq:
- *   rat.coerce(numeric)   =>  array
+ *   rat.coerce(numeric)  =>  array
  *
  * If _numeric_ is a +Rational+ object, returns an +Array+ containing _rat_
  * and _numeric_. Otherwise, returns an +Array+ with both _rat_ and _numeric_
@@ -1080,7 +1081,7 @@
  * find a compatible common type between the two operands of the operator.
  *
  * For example:
- * 
+ *
  *     Rational(2).coerce(Rational(3))  #=> [(2), (3)]
  *     Rational(5).coerce(7)            #=> [(7, 1), (5, 1)]
  *     Rational(9, 8).coerce(4)         #=> [(4, 1), (9, 8)]
@@ -1113,17 +1114,17 @@
 
 /*
  * call-seq:
- *   rat.div(numeric)   =>  integer
+ *   rat.div(numeric)  =>  integer
  *
  * Uses +/+ to divide _rat_ by _numeric_, then returns the floor of the result
  * as an +Integer+ object.
  *
  * A +TypeError+ is raised unless _numeric_ is a +Numeric+ object. A
  * +ZeroDivisionError+ is raised if _numeric_ is 0. A +FloatDomainError+ is
- * raised if _numeric_ is 0.0. 
- * 
+ * raised if _numeric_ is 0.0.
+ *
  * For example:
- * 
+ *
  *     Rational(2, 3).div(Rational(2, 3))   #=> 1
  *     Rational(-2, 9).div(Rational(-9, 2)) #=> 0
  *     Rational(3, 4).div(0.1)              #=> 7
@@ -1140,19 +1141,19 @@
 
 /*
  * call-seq:
- *   rat.modulo(numeric)   =>  numeric
- *   rat % numeric         =>  numeric
+ *   rat.modulo(numeric)  =>  numeric
+ *   rat % numeric        =>  numeric
  *
- * Returns the modulo of _rat_ and _numeric_ as a +Numeric+ object, i.e.:
+ * Returns the modulo of _rat_ and _numeric_ as a +Numeric+ object.
  *
- *     _rat_-_numeric_*(rat/numeric).floor 
- * 
+ *     x.modulo(y) means x-y*(x/y).floor
+ *
  * A +TypeError+ is raised unless _numeric_ is a +Numeric+ object. A
  * +ZeroDivisionError+ is raised if _numeric_ is 0. A +FloatDomainError+ is
  * raised if _numeric_ is 0.0.
- * 
+ *
  * For example:
- * 
+ *
  *     Rational(2, 3)  % Rational(2, 3)  #=> (0/1)
  *     Rational(2)     % Rational(300)   #=> (2/1)
  *     Rational(-2, 9) % Rational(9, -2) #=> (-2/9)
@@ -1167,20 +1168,19 @@
     return f_sub(self, f_mul(other, val));
 }
 
-
 /*
  * call-seq:
- *   rat.divmod(numeric)   =>  array
+ *   rat.divmod(numeric)  =>  array
  *
  * Returns a two-element +Array+ containing the quotient and modulus obtained
- * by dividing _rat_ by _numeric_. Both elements are +Numeric+. 
+ * by dividing _rat_ by _numeric_. Both elements are +Numeric+.
  *
  * A +ZeroDivisionError+ is raised if _numeric_ is 0. A +FloatDomainError+ is
  * raised if _numeric_ is 0.0. A +TypeError+ is raised unless _numeric_ is a
  * +Numeric+ object.
- * 
+ *
  * For example:
- * 
+ *
  *     Rational(3).divmod(3)                   #=> [1, (0/1)]
  *     Rational(4).divmod(3)                   #=> [1, (1/1)]
  *     Rational(5).divmod(3)                   #=> [1, (2/1)]
@@ -1206,24 +1206,24 @@
 #endif
 
 /*
- * call-seq: rat.remainder(numeric)   =>  numeric_result
+ * call-seq:
+ *   rat.remainder(numeric)  =>  numeric_result
  *
- * Returns the remainder of dividing _rat_ by _numeric_ as a +Numeric+ object,
- * i.e.:
+ * Returns the remainder of dividing _rat_ by _numeric_ as a +Numeric+ object.
  *
- *     _rat_-_numeric_*(_rat_/_numeric_).truncate
+ *     x.remainder(y) means x-y*(x/y).truncate
  *
  * A +ZeroDivisionError+ is raised if _numeric_ is 0. A +FloatDomainError+ is
  * raised if the result is Infinity or NaN, or _numeric_ is 0.0. A +TypeError+
  * is raised unless _numeric_ is a +Numeric+ object.
  *
  * For example:
- * 
+ *
  *     Rational(3, 4).remainder(Rational(3))   #=> (3/4)
  *     Rational(12,13).remainder(-8)           #=> (12/13)
  *     Rational(2,3).remainder(-Rational(3,2)) #=> (2/3)
  *     Rational(-5,7).remainder(7.1)           #=> -0.7142857142857143
- *     Rational(1).remainder(0)                # ZeroDivisionError: 
+ *     Rational(1).remainder(0)                # ZeroDivisionError:
  *                                             # divided by zero
  */
 static VALUE
@@ -1245,14 +1245,14 @@
 
 /*
  * call-seq:
- *   rat.abs   =>  rational
+ *   rat.abs  =>  rational
  *
  * Returns the absolute value of _rat_. If _rat_ is positive, it is
  * returned; if _rat_ is negative its negation is returned. The return value
- * is a +Rational+ object. 
+ * is a +Rational+ object.
  *
  * For example:
- * 
+ *
  *     Rational(2).abs       #=> (2/1)
  *     Rational(-2).abs      #=> (2/1)
  *     Rational(-8, -1).abs  #=> (8/1)
@@ -1292,12 +1292,15 @@
 
 /*
  * call-seq:
- *   rat.to_i   =>  integer
+ *   rat.to_i  =>  integer
  *
  * Returns _rat_ truncated to an integer as an +Integer+ object.
  *
+ *  Equivalent to
+ *  <i>rat</i>.<code>truncate(</code>.
+ *
  * For example:
- * 
+ *
  *   Rational(2, 3).to_i   #=> 0
  *   Rational(3).to_i      #=> 3
  *   Rational(300.6).to_i  #=> 300
@@ -1366,9 +1369,9 @@
 
 /*
  * call-seq:
- *   rat.floor              =>  integer
- *   rat.floor(precision=0) =>  numeric
- *   
+ *   rat.floor               =>  integer
+ *   rat.floor(precision=0)  =>  numeric
+ *
  * Returns the largest integer less than or equal to _rat_ as an +Integer+
  * object. Contrast with +Rational#ceil+.
  *
@@ -1377,9 +1380,9 @@
  * decimal places. If _precision_ is negative, the result is rounded downwards
  * to the nearest 10**_precision_. By default _precision_ is equal to 0,
  * causing the result to be a whole number.
- * 
+ *
  * For example:
- * 
+ *
  *     Rational(2, 3).floor   #=> 0
  *     Rational(3).floor      #=> 3
  *     Rational(300.6).floor  #=> 300
@@ -1400,9 +1403,9 @@
 
 /*
  * call-seq:
- *   rat.ceil              =>  integer
- *   rat.ceil(precision=0) =>  numeric
- *   
+ *   rat.ceil               =>  integer
+ *   rat.ceil(precision=0)  =>  numeric
+ *
  * Returns the smallest integer greater than or equal to _rat_ as an +Integer+
  * object. Contrast with +Rational#floor+.
  *
@@ -1413,7 +1416,7 @@
  * causing the result to be a whole number.
  *
  * For example:
- * 
+ *
  *     Rational(2, 3).ceil   #=> 1
  *     Rational(3).ceil      #=> 3
  *     Rational(300.6).ceil  #=> 301
@@ -1445,7 +1448,7 @@
  * causing the result to be a whole number.
  *
  * For example:
- * 
+ *
  *     Rational(2, 3).truncate     #=> 0
  *     Rational(3).truncate        #=> 3
  *     Rational(300.6).truncate    #=> 300
@@ -1467,9 +1470,9 @@
 
 /*
  * call-seq:
- *   rat.round             =>  integer
+ *   rat.round               =>  integer
  *   rat.round(precision=0)  =>  numeric
- * 
+ *
  * Rounds _rat_ to an integer, and returns the result as an +Integer+ object.
  *
  * An optional _precision_ argument can be supplied as an +Integer+. If
@@ -1481,7 +1484,7 @@
  * A +TypeError+ is raised if _integer_ is given and not an +Integer+ object.
  *
  * For example:
- * 
+ *
  *     Rational(9, 3.3).round    #=> 3
  *     Rational(9, 3.3).round(1) #=> (27/10)
  *     Rational(9,3.3).round(2)  #=> (273/100)
@@ -1493,7 +1496,7 @@
  *     Rational(-123.456).round.to_f     #=> -123.0
  *     Rational(-123.456).round(-1).to_f #=> -120.0
  *     Rational(-123.456).round(-2).to_f #=> -100.0
- * 
+ *
  */
 static VALUE
 nurat_round_n(int argc, VALUE *argv, VALUE self)
@@ -1503,13 +1506,13 @@
 
 /*
  * call-seq:
- *   rat.to_f             =>  float
- * 
+ *   rat.to_f  =>  float
+ *
  * Converts _rat_ to a floating point number and returns the result as a
  * +Float+ object.
  *
  * For example:
- * 
+ *
  *     Rational(2).to_f      #=> 2.0
  *     Rational(9, 4).to_f   #=> 2.25
  *     Rational(-3, 4).to_f  #=> -0.75
@@ -1524,12 +1527,12 @@
 
 /*
  * call-seq:
- *   rat.to_r             =>  self
- * 
+ *   rat.to_r  =>  self
+ *
  * Returns self, i.e. a +Rational+ object representing _rat_.
  *
  * For example:
- * 
+ *
  *     Rational(2).to_r      #=> (2/1)
  *     Rational(-8, 6).to_r  #=> (-4/3)
  *     Rational(39.2).to_r   #=> (2758454771764429/70368744177664)
@@ -1571,13 +1574,13 @@
 
 /*
  * call-seq:
- *   rat.to_s             =>  string
- * 
+ *   rat.to_s  =>  string
+ *
  * Returns a +String+ representation of _rat_ in the form
  * "_numerator_/_denominator_".
  *
  * For example:
- * 
+ *
  *     Rational(2).to_s      #=> "2/1"
  *     Rational(-8, 6).to_s  #=> "-4/3"
  *     Rational(0.5).to_s    #=> "1/2"
@@ -1590,13 +1593,13 @@
 
 /*
  * call-seq:
- *   rat.inspect             =>  string
- * 
+ *   rat.inspect  =>  string
+ *
  * Returns a +String+ containing a human-readable representation of _rat_ in
  * the form "(_numerator_/_denominator_)".
  *
  * For example:
- * 
+ *
  *     Rational(2).to_s      #=> "(2/1)"
  *     Rational(-8, 6).to_s  #=> "(-4/3)"
  *     Rational(0.5).to_s    #=> "(1/2)"
@@ -1644,16 +1647,16 @@
 
 /*
  * call-seq:
- *   int.gcd(_int2_)             =>  integer
- * 
+ *   int.gcd(_int2_)  =>  integer
+ *
  * Returns the greatest common divisor of _int_ and _int2_: the largest
  * positive integer that divides the two without a remainder. The result is an
- * +Integer+ object. 
+ * +Integer+ object.
  *
  * An +ArgumentError+ is raised unless _int2_ is an +Integer+ object.
  *
  * For example:
- * 
+ *
  *     2.gcd(2)      #=> 2
  *     -2.gcd(2)     #=> 2
  *     8.gcd(6)      #=> 2
@@ -1668,8 +1671,8 @@
 
 /*
  * call-seq:
- *   int.lcm(_int2_)             =>  integer
- * 
+ *   int.lcm(_int2_)  =>  integer
+ *
  * Returns the least common multiple (or "lowest common multiple") of _int_
  * and _int2_: the smallest positive integer that is a multiple of both
  * integers. The result is an +Integer+ object.
@@ -1677,7 +1680,7 @@
  * An +ArgumentError+ is raised unless _int2_ is an +Integer+ object.
  *
  * For example:
- * 
+ *
  *     2.lcm(2)      #=> 2
  *     -2.gcd(2)     #=> 2
  *     8.gcd(6)      #=> 24
@@ -1692,17 +1695,17 @@
 
 /*
  * call-seq:
- *   int.gcdlcm(_int2_)             =>  array
- * 
+ *   int.gcdlcm(_int2_)  =>  array
+ *
  * Returns a two-element +Array+ containing _int_.gcd(_int2_) and
  * _int_.lcm(_int2_) respectively. That is, the greatest common divisor of
  * _int_ and _int2_, then the least common multiple of _int_ and _int2_. Both
- * elements are +Integer+ objects. 
+ * elements are +Integer+ objects.
  *
  * An +ArgumentError+ is raised unless _int2_ is an +Integer+ object.
  *
  * For example:
- * 
+ *
  *     2.gcdlcm(2)      #=> [2, 2]
  *     -2.gcdlcm(2)     #=> [2, 2]
  *     8.gcdlcm(6)      #=> [2, 24]
@@ -1748,6 +1751,12 @@
 #define id_to_r rb_intern("to_r")
 #define f_to_r(x) rb_funcall(x, id_to_r, 0)
 
+/*
+ * call-seq:
+ *   num.numerator  =>  integer
+ *
+ * Returns the numerator of _num_ as an +Integer+ object.
+ */
 static VALUE
 numeric_numerator(VALUE self)
 {
@@ -1760,18 +1769,36 @@
     return f_denominator(f_to_r(self));
 }
 
+/*
+ * call-seq:
+ *   int.numerator  =>  self
+ *
+ * Returns self.
+ */
 static VALUE
 integer_numerator(VALUE self)
 {
     return self;
 }
 
+/*
+ * call-seq:
+ *   int.numerator  =>  1
+ *
+ * Returns 1.
+ */
 static VALUE
 integer_denominator(VALUE self)
 {
     return INT2FIX(1);
 }
 
+/*
+ * call-seq:
+ *   flo.numerator  =>  integer
+ *
+ * Returns the numerator of _flo_ as an +Integer+ object.
+ */
 static VALUE
 float_numerator(VALUE self)
 {
@@ -1781,6 +1808,12 @@
     return rb_call_super(0, 0);
 }
 
+/*
+ * call-seq:
+ *   flo.denominator  =>  integer
+ *
+ * Returns the denominator of _flo_ as an +Integer+ object.
+ */
 static VALUE
 float_denominator(VALUE self)
 {
@@ -1792,12 +1825,12 @@
 
 /*
  * call-seq:
- *   nil.to_r             =>  Rational(0, 1)
- * 
+ *   nil.to_r  =>  Rational(0, 1)
+ *
  * Returns a +Rational+ object representing _nil_ as a rational number.
  *
  * For example:
- * 
+ *
  *     nil.to_r    #=> (0/1)
  */
 static VALUE
@@ -1809,12 +1842,12 @@
 
 /*
  * call-seq:
- *   int.to_r             =>  rational
- * 
+ *   int.to_r  =>  rational
+ *
  * Returns a +Rational+ object representing _int_ as a rational number.
  *
  * For example:
- * 
+ *
  *     1.to_r    #=> (1/1)
  *     12.to_r   #=> (12/1)
  */
@@ -1850,13 +1883,13 @@
 
 /*
  * call-seq:
- *   flt.to_r             =>  rational
- * 
+ *   flt.to_r  =>  rational
+ *
  * Returns _flt_ as an +Rational+ object. Raises a +FloatDomainError+ if _flt_
  * is +Infinity+ or +NaN+.
  *
  * For example:
- * 
+ *
  *     2.0.to_r      #=> (2/1)
  *     2.5.to_r      #=> (5/2)
  *     -0.75.to_r    #=> (-3/4)
@@ -2009,15 +2042,15 @@
 
 /*
  * call-seq:
- *   string.to_r             =>  rational
- * 
+ *   string.to_r  =>  rational
+ *
  * Returns a +Rational+ object representing _string_ as a rational number.
  * Leading and trailing whitespace is ignored. Underscores may be used to
  * separate numbers. If _string_ is not recognised as a rational, (0/1) is
  * returned.
- * 
+ *
  * For example:
- * 
+ *
  *     "2".to_r      #=> (2/1)
  *     "300/2".to_r  #=> (150/1)
  *     "-9.2/3".to_r #=> (-46/15)
@@ -2137,14 +2170,14 @@
  *
  * The first argument is the numerator, the second the denominator. If the
  * denominator is not supplied it defaults to 1. The arguments can be
- * +Numeric+ or +String+ objects. 
+ * +Numeric+ or +String+ objects.
  *
  *     Rational(12) == Rational(12, 1) #=> true
  *
  * A +ZeroDivisionError+ will be raised if 0 is specified as the denominator:
  *
  *     Rational(3, 0)  #=> ZeroDivisionError: divided by zero
- * 
+ *
  * The numerator and denominator of a +Rational+ object can be retrieved with
  * the +Rational#numerator+ and +Rational#denominator+ accessors,
  * respectively.
@@ -2163,28 +2196,28 @@
  *     30.to_r          #=> (30/1)
  *     3.33.to_r        #=> (1874623344892969/562949953421312)
  *     '33/3'.to_r      #=> (11/1)
- * 
+ *
  * The reverse operations work as you would expect:
- *    
+ *
  *     Rational(30, 1).to_i                              #=> 30
  *     Rational(1874623344892969, 562949953421312).to_f  #=> 3.33
  *     Rational(11, 1).to_s                              #=> "11/1"
- *     
+ *
  * +Rational+ objects can be compared with other +Numeric+ objects using the
  * normal semantics:
  *
  *     Rational(20, 10) == Rational(2, 1) #=> true
  *     Rational(10) > Rational(1)         #=> true
  *     Rational(9, 2) <=> Rational(8, 3)  #=> 1
- * 
+ *
  * Similarly, standard mathematical operations support +Rational+ objects, too:
  *
  *     Rational(9, 2) * 2                #=> (9/1)
  *     Rational(12, 29) / Rational(2,3)  #=> (18/29)
  *     Rational(7,5) + Rational(60)      #=> (307/5)
  *     Rational(22, 5) - Rational(5, 22) #=> (459/110)
- *     Rational(2,3) ** 3                #=> (8/27)       
- */ 
+ *     Rational(2,3) ** 3                #=> (8/27)
+ */
 void
 Init_Rational(void)
 {
@@ -2249,7 +2282,7 @@
     rb_define_method(rb_cRational, "divmod", nurat_divmod, 1);
 
 #if 0
-    rb_define_method(rb_cRational, "quot", nurat_quot, 1); 
+    rb_define_method(rb_cRational, "quot", nurat_quot, 1);
 #endif
     rb_define_method(rb_cRational, "remainder", nurat_rem, 1);
 #if 0

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]