From da32ce1a67677bd0f5df8fa31e0ab05c26c7d401 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 7 Dec 2005 08:41:59 +0000 Subject: * sprintf.c (rb_f_sprintf): [ruby-dev:27967] * range.c (range_include): use discrete membership for non Numeric values, for example, String. * numeric.c (num_scalar_p): new method. [ruby-dev:27936] * lib/complex.rb (Complex#scalar?): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/complex.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/complex.rb') diff --git a/lib/complex.rb b/lib/complex.rb index 110a28ee7e..8832f17f82 100644 --- a/lib/complex.rb +++ b/lib/complex.rb @@ -103,6 +103,10 @@ class Complex < Numeric undef step + def scalar? + false + end + def Complex.generic?(other) # :nodoc: other.kind_of?(Integer) or other.kind_of?(Float) or -- cgit v1.2.3