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

ruby-changes:27643

From: tadf <ko1@a...>
Date: Sun, 10 Mar 2013 17:01:42 +0900 (JST)
Subject: [ruby-changes:27643] tadf:r39695 (trunk): * complex.c: edited rdoc.

tadf	2013-03-10 17:01:32 +0900 (Sun, 10 Mar 2013)

  New Revision: 39695

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

  Log:
    * complex.c: edited rdoc.
    * rational.c: ditto.

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

Index: complex.c
===================================================================
--- complex.c	(revision 39694)
+++ complex.c	(revision 39695)
@@ -486,6 +486,7 @@ f_complex_new2(VALUE klass, VALUE x, VAL https://github.com/ruby/ruby/blob/trunk/complex.c#L486
  *
  * Syntax of string form:
  *
+ *   string form = extra spaces , complex , extra spaces ;
  *   complex = real part | [ sign ] , imaginary part
  *           | real part , sign , imaginary part
  *           | rational , "@" , rational ;
@@ -499,8 +500,11 @@ f_complex_new2(VALUE klass, VALUE x, VAL https://github.com/ruby/ruby/blob/trunk/complex.c#L500
  *   fractional part = "." , digits , [ ( "e" | "E" ) , [ sign ] , digits ] ;
  *   imaginary unit = "i" | "I" | "j" | "J" ;
  *   sign = "-" | "+" ;
- *   digits = digit , [ { digit | "_" , digit } ] ;
+ *   digits = digit , { digit | "_" , digit };
  *   digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
+ *   extra spaces = ? \s* ? ;
+ *
+ * See String#to_c.
  */
 static VALUE
 nucomp_f_complex(int argc, VALUE *argv, VALUE klass)
@@ -1843,6 +1847,8 @@ string_to_c_strict(VALUE self) https://github.com/ruby/ruby/blob/trunk/complex.c#L1847
  *    '-0.0-0.0i'.to_c   #=> (-0.0-0.0i)
  *    '1/2+3/4i'.to_c    #=> ((1/2)+(3/4)*i)
  *    'ruby'.to_c        #=> (0+0i)
+ *
+ * See Kernel.Complex.
  */
 static VALUE
 string_to_c(VALUE self)
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39694)
+++ ChangeLog	(revision 39695)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Mar 10 17:00:22 2013  Tadayoshi Funaba  <tadf@d...>
+
+	* complex.c: edited rdoc.
+	* rational.c: ditto.
+
 Sun Mar 10 15:02:39 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* process.c (setup_communication_pipe): remove unused function.
Index: rational.c
===================================================================
--- rational.c	(revision 39694)
+++ rational.c	(revision 39695)
@@ -574,6 +574,7 @@ f_rational_new_no_reduce2(VALUE klass, V https://github.com/ruby/ruby/blob/trunk/rational.c#L574
  *
  * Syntax of string form:
  *
+ *   string form = extra spaces , rational , extra spaces ;
  *   rational = [ sign ] , unsigned rational ;
  *   unsigned rational = numerator | numerator , "/" , denominator ;
  *   numerator = integer part | fractional part | integer part , fractional part ;
@@ -581,8 +582,11 @@ f_rational_new_no_reduce2(VALUE klass, V https://github.com/ruby/ruby/blob/trunk/rational.c#L582
  *   integer part = digits ;
  *   fractional part = "." , digits , [ ( "e" | "E" ) , [ sign ] , digits ] ;
  *   sign = "-" | "+" ;
- *   digits = digit , [ { digit | "_" , digit } ] ;
+ *   digits = digit , { digit | "_" , digit } ;
  *   digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
+ *   extra spaces = ? \s* ? ;
+ *
+ * See String#to_r.
  */
 static VALUE
 nurat_f_rational(int argc, VALUE *argv, VALUE klass)
@@ -2268,6 +2272,8 @@ string_to_r_strict(VALUE self) https://github.com/ruby/ruby/blob/trunk/rational.c#L2272
  *    '21 june 09'.to_r  #=> (21/1)
  *    '21/06/09'.to_r    #=> (7/2)
  *    'bwv 1079'.to_r    #=> (0/1)
+ *
+ * See Kernel.Rational.
  */
 static VALUE
 string_to_r(VALUE self)

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

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