pub unsafe extern "C" fn rb_singleton_class_clone(obj: VALUE) -> VALUEExpand description
Clones a singleton class. An object can have its own singleton class. OK. Then what happens when a program clones such object? The singleton class that is attached to the source object must also be cloned. Otherwise a singleton object gets shared with two objects, which breaks “singleton”-ness of such class.
This is basically an implementation detail of [rb_clone_setup]. People
need not be aware of this working behind-the-scene.
§@param[in] obj The object that has its own singleton class. @return Cloned singleton class.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3