From 9f2922bdcd27453bf5814f4d8703ee55635ed033 Mon Sep 17 00:00:00 2001 From: gogotanaka Date: Sat, 21 Mar 2015 12:32:09 +0000 Subject: [PATCH] complex.c: [DOC] mention about Complex literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- complex.c | 5 +++-- 1 file 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)