diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-16 22:04:19 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-16 22:04:19 +0000 |
commit | acde7364f707cc831a79fd7a221635d4ec8648a4 (patch) | |
tree | 79f122b6a5a5182b2d715363c9045f36582e9d42 /numeric.c | |
parent | d9d3781de0cfac4d0fa5e2dd9c920f7c66a77a3f (diff) | |
download | ruby-acde7364f707cc831a79fd7a221635d4ec8648a4.tar.gz |
* numeric.c: provides predicate real? instead of scalar?.
* complex.c: follows the above change.
* lib/cmath.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -385,14 +385,14 @@ num_remainder(VALUE x, VALUE y) /* * call-seq: - * num.scalar? -> true or false + * num.real? -> true or false * - * Returns <code>true</code> if <i>num</i> is an <code>Scalar</code> + * Returns <code>true</code> if <i>num</i> is a <code>Real</code> * (i.e. non <code>Complex</code>). */ static VALUE -num_scalar_p(VALUE num) +num_real_p(VALUE num) { return Qtrue; } @@ -3145,7 +3145,7 @@ Init_Numeric(void) rb_define_method(rb_cNumeric, "magnitude", num_abs, 0); rb_define_method(rb_cNumeric, "to_int", num_to_int, 0); - rb_define_method(rb_cNumeric, "scalar?", num_scalar_p, 0); + rb_define_method(rb_cNumeric, "real?", num_real_p, 0); rb_define_method(rb_cNumeric, "integer?", num_int_p, 0); rb_define_method(rb_cNumeric, "zero?", num_zero_p, 0); rb_define_method(rb_cNumeric, "nonzero?", num_nonzero_p, 0); |