End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method · added in Ruby 3.1
Method#private?
meth.private? → true or false
proc.c
View on GitHub ↗
static VALUE
method_private_p(VALUE method)
{
const struct METHOD *data;
TypedData_Get_Struct(method, struct METHOD, &method_data_type, data);
return RBOOL(METHOD_ENTRY_VISI(data->me) == METHOD_VISI_PRIVATE);
}
Returns whether the method is private.
Ruby version changes
- 3.1