End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Numeric#ceil
num.ceil([ndigits]) → integer or float
numeric.c
View on GitHub ↗
static VALUE
num_ceil(int argc, VALUE *argv, VALUE num)
{
return flo_ceil(argc, argv, rb_Float(num));
}
Returns the smallest number greater than or equal to num with a precision of ndigits decimal digits (default: 0).
Numeric implements this by converting its value to a Float and invoking Float#ceil.