summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--lib/complex.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f00c1d8bfb..adb8309648 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,7 +15,7 @@ Sun Sep 21 07:43:16 2008 Tadayoshi Funaba <tadf@dotrb.org>
* lib/mathn.rb: ditto.
- * lib/complex.rb: ditto.
+ * lib/complex.rb: ditto. and provides some obsolate methods.
Sun Sep 21 02:48:45 2008 NARUSE, Yui <naruse@ruby-lang.org>
diff --git a/lib/complex.rb b/lib/complex.rb
index c03ee63c3e..301879143f 100644
--- a/lib/complex.rb
+++ b/lib/complex.rb
@@ -16,3 +16,9 @@ class Complex
alias image imag
end
+
+class Numeric
+
+ def im() Complex(0, self) end
+
+end