/* * call-seq: * mod.private_class_method(symbol, ...) => mod * * Makes existing class methods private. Often used to hide the default * constructor <code>new</code>. * * class SimpleSingleton # Not thread safe * private_class_method :new * def SimpleSingleton.create(*args, &block) * @me = new(*args, &block) if ! @me * @me * end * end */ static VALUE rb_mod_private_method(argc, argv, obj) int argc; VALUE *argv; VALUE obj; { set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PRIVATE); return obj; }