summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-10 08:01:32 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-10 08:01:32 +0000
commit9a4f037502254f50475f0b48d37fe84d5e8e4813 (patch)
treeecf2d2d9ea59c7da4a60d2f1649b4387e89d1126 /complex.c
parentde6d82f90703bde85bfd419aeb343ef0fd94044b (diff)
* complex.c: edited rdoc.
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/complex.c b/complex.c
index 5445b49..f6f63f6 100644
--- a/complex.c
+++ b/complex.c
@@ -486,6 +486,7 @@ f_complex_new2(VALUE klass, VALUE x, VALUE y)
*
* 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, VALUE y)
* 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)
* '-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)