summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-10 10:29:13 (GMT)
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-10 10:29:13 (GMT)
commite864787c849bd723747d753837bc8bdce0428589 (patch)
tree8ea2c2cb8f27b1a48af1b029b3220f8a1c7ebb93 /complex.c
parentb04aa4d2cfcae41f039f964fdfa99e3428fd8710 (diff)
* complex.c: modified doc.
* ratioanl.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/complex.c b/complex.c
index f2f5240..d04c7d7 100644
--- a/complex.c
+++ b/complex.c
@@ -481,7 +481,8 @@ f_complex_new2(VALUE klass, VALUE x, VALUE y)
*
* Returns x+i*y;
*
- * Complex(1, 2) #=> (1+2i)
+ * Complex(1, 2) #=> (1+2i)
+ * Complex('1+2i') #=> (1+2i)
*/
static VALUE
nucomp_f_complex(int argc, VALUE *argv, VALUE klass)
@@ -1427,6 +1428,8 @@ nucomp_to_f(VALUE self)
* Complex(1, 0).to_r #=> (1/1)
* Complex(1, 0.0).to_r # RangeError
* Complex(1, 2).to_r # RangeError
+ *
+ * See rationalize.
*/
static VALUE
nucomp_to_r(VALUE self)
@@ -1446,12 +1449,13 @@ nucomp_to_r(VALUE self)
* cmp.rationalize([eps]) -> rational
*
* Returns the value as a rational if possible (the imaginary part
- * should be exactly zero). The optional argument eps is always
- * ignored.
+ * should be exactly zero).
*
* Complex(1.0/3, 0).rationalize #=> (1/3)
* Complex(1, 0.0).rationalize # RangeError
* Complex(1, 2).rationalize # RangeError
+ *
+ * See to_r.
*/
static VALUE
nucomp_rationalize(int argc, VALUE *argv, VALUE self)