summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgogotanaka <gogotanaka@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-21 12:32:09 +0000
committergogotanaka <gogotanaka@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-21 12:32:09 +0000
commit9f2922bdcd27453bf5814f4d8703ee55635ed033 (patch)
tree5c2962ec5bfc82c3736dd0fdeebe075c75e0cc04
parente458cf52336bab8ef00713ab309c22895935b7ab (diff)
complex.c: [DOC] mention about Complex literal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--complex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/complex.c b/complex.c
index cf7b29345c..65ae87e7f7 100644
--- a/complex.c
+++ b/complex.c
@@ -2088,9 +2088,10 @@ float_arg(VALUE self)
* and i is imaginary unit. Real a equals complex a+0i
* mathematically.
*
- * In ruby, you can create complex object with Complex, Complex::rect,
- * Complex::polar or to_c method.
+ * Complex object can be created as literal, and also by using
+ * Kernel#Complex, Complex::rect, Complex::polar or to_c method.
*
+ * 2+1i #=> (2+1i)
* Complex(1) #=> (1+0i)
* Complex(2, 3) #=> (2+3i)
* Complex.polar(2, 3) #=> (-1.9799849932008908+0.2822400161197344i)