1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
matz 2005-12-07 08:41:59 +00:00
parent e122cca179
commit da32ce1a67
5 changed files with 57 additions and 16 deletions

View file

@ -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