summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-16 22:04:19 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-16 22:04:19 +0000
commitacde7364f707cc831a79fd7a221635d4ec8648a4 (patch)
tree79f122b6a5a5182b2d715363c9045f36582e9d42 /numeric.c
parentd9d3781de0cfac4d0fa5e2dd9c920f7c66a77a3f (diff)
* 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/numeric.c b/numeric.c
index 45e17d2..6301ade 100644
--- a/numeric.c
+++ b/numeric.c
@@ -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);