End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Module#private_constant
mod.private_constant(symbol, ...) => mod
object.c
View on GitHub ↗
VALUE
rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj)
{
set_const_visibility(obj, argc, argv, CONST_PRIVATE, CONST_VISIBILITY_MASK);
return obj;
}
Makes a list of existing constants private.
See also
#private_class_method
#private_instance_methods
#private
#private_method_defined?
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1