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

ruby-changes:17873

From: tadf <ko1@a...>
Date: Tue, 23 Nov 2010 23:29:07 +0900 (JST)
Subject: [ruby-changes:17873] Ruby:r29887 (trunk): modified some descriptions.

tadf	2010-11-23 23:28:55 +0900 (Tue, 23 Nov 2010)

  New Revision: 29887

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

  Log:
    modified some descriptions.

  Modified files:
    trunk/complex.c
    trunk/rational.c

Index: complex.c
===================================================================
--- complex.c	(revision 29886)
+++ complex.c	(revision 29887)
@@ -1077,7 +1077,7 @@
  * call-seq:
  *    cmp.denominator  ->  integer
  *
- * Returns the denominator (lcm of both denominator, real and imag).
+ * Returns the denominator (lcm of both denominator - real and imag).
  *
  * See numerator.
  */
@@ -1646,7 +1646,7 @@
     if (argc == 1) {
 	if (k_numeric_p(a1) && !f_real_p(a1))
 	    return a1;
-	/* expect raise exception for consistency */
+	/* should raise exception for consistency */
 	if (!k_numeric_p(a1))
 	    return rb_convert_type(a1, T_COMPLEX, "Complex", "to_c");
     }
Index: rational.c
===================================================================
--- rational.c	(revision 29886)
+++ rational.c	(revision 29887)
@@ -667,7 +667,7 @@
 
 /*
  * call-seq:
- *    rat + numeric  ->  numeric_result
+ *    rat + numeric  ->  numeric
  *
  * Performs addition.
  *
@@ -709,7 +709,7 @@
 
 /*
  * call-seq:
- *    rat - numeric  ->  numeric_result
+ *    rat - numeric  ->  numeric
  *
  * Performs subtraction.
  *
@@ -790,7 +790,7 @@
 
 /*
  * call-seq:
- *    rat * numeric  ->  numeric_result
+ *    rat * numeric  ->  numeric
  *
  * Performs multiplication.
  *
@@ -832,8 +832,8 @@
 
 /*
  * call-seq:
- *    rat / numeric     ->  numeric_result
- *    rat.quo(numeric)  ->  numeric_result
+ *    rat / numeric     ->  numeric
+ *    rat.quo(numeric)  ->  numeric
  *
  * Performs division.
  *
@@ -913,7 +913,7 @@
 
 /*
  * call-seq:
- *    rat ** numeric  ->  numeric_result
+ *    rat ** numeric  ->  numeric
  *
  * Performs exponentiation.
  *
@@ -1145,7 +1145,6 @@
     return f_negate(f_idiv(f_negate(dat->num), dat->den));
 }
 
-
 /*
  * call-seq:
  *    rat.to_i  ->  integer
@@ -2224,8 +2223,8 @@
  * a/b (b>0).  Where a is numerator and b is denominator.  Integer a
  * equals rational a/1 mathematically.
  *
- * In ruby, you can create rational object with Rational or to_r
- * method.  The return values will be irreducible.
+ * In ruby, you can create rational object with Rational, to_r or
+ * rationalize method.  The return values will be irreducible.
  *
  *    Rational(1)      #=> (1/1)
  *    Rational(2, 3)   #=> (2/3)
@@ -2242,6 +2241,7 @@
  *    0.3.to_r         #=> (5404319552844595/18014398509481984)
  *    '0.3'.to_r       #=> (3/10)
  *    '2/3'.to_r       #=> (2/3)
+ *    0.3.rationalize  #=> (3/10)
  *
  * A rational object is an exact number, which helps you to write
  * program without any rounding errors.

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

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