End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Numeric#clone
clone(freeze: true) → self
numeric.c
View on GitHub ↗
static VALUE
num_clone(int argc, VALUE *argv, VALUE x)
{
return rb_immutable_obj_clone(argc, argv, x);
}
Returns self.
Raises an exception if the value for freeze is neither true nor nil.
Related: Numeric#dup.