From 0dc342de848a642ecce8db697b8fecd83a63e117 Mon Sep 17 00:00:00 2001 From: yugui Date: Mon, 25 Aug 2008 15:02:05 +0000 Subject: added tag v1_9_0_4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_0_4@18845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- trunk/lib/complex.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 trunk/lib/complex.rb (limited to 'trunk/lib/complex.rb') diff --git a/trunk/lib/complex.rb b/trunk/lib/complex.rb new file mode 100644 index 0000000000..1845f30b1f --- /dev/null +++ b/trunk/lib/complex.rb @@ -0,0 +1,10 @@ +require 'cmath' + +Object.instance_eval{remove_const :Math} +Math = CMath + +def Complex.generic? (other) + other.kind_of?(Integer) || + other.kind_of?(Float) || + other.kind_of?(Rational) +end -- cgit v1.2.3