aboutsummaryrefslogtreecommitdiffstats
path: root/complex.c
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-24 00:10:53 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-24 00:10:53 +0000
commitaf9398ab38fa7b1f177b3079c80eb1131a2d693b (patch)
tree17f0c40e39e05cb41b308a4fe0f97451ba5cae0f /complex.c
parent45c6daeed7e02fab59bf9aedcaf42be64b4ea61d (diff)
downloadruby-af9398ab38fa7b1f177b3079c80eb1131a2d693b.tar.gz
* complex.c (Init_Complex): Document Complex::I. Patch by Sylvain
Daubert. [Feature #5623] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/complex.c b/complex.c
index 29652c5e4c..7f2d79b6d2 100644
--- a/complex.c
+++ b/complex.c
@@ -1981,6 +1981,9 @@ Init_Complex(void)
rb_define_method(rb_cFloat, "angle", float_arg, 0);
rb_define_method(rb_cFloat, "phase", float_arg, 0);
+ /*
+ * (0+1i)
+ */
rb_define_const(rb_cComplex, "I",
f_complex_new_bang2(rb_cComplex, ZERO, ONE));
}