Class: Object

Inherits:
BasicObject
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#numeric?bool

Returns a boolean whether the object is a numeric class.

Examples:

1.numeric? #=> true
1.0.numric? #=> true
(1+1i).numeric? #=> true
(1/3r).numeric? #=> true
nil.numeric? #=> false
"1.0".numeric? #=> false

Returns:

  • (bool)

    Whether self is a numeric class



52
53
54
55
56
# File 'ext/bigdecimal/math_r/overrides.c', line 52

static VALUE
__impl_obj_numeric_p(VALUE self)
{
	return rb_num_numeric_p(self) ? Qtrue : Qfalse;
}