diff options
author | Mike Dalessio <[email protected]> | 2021-05-28 02:50:37 -0400 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-08-20 08:30:06 +0900 |
commit | c0f4e4ca6d0f76985bca79314b232b787c8f008e (patch) | |
tree | 4d1796f3387a3b6f9ef4dc43bbbc48dfc435501b /ext/objspace/objspace.c | |
parent | e8e3b7a0e2fc2cc6384eb10332cc46e385373cbb (diff) |
undefine alloc functions for C extensions
per guidance in doc/extension.rdoc, these classes now undefine their
alloc functions:
- ObjectSpace::InternalObjectWrapper
- Socket::Ifaddr
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4604
Diffstat (limited to 'ext/objspace/objspace.c')
-rw-r--r-- | ext/objspace/objspace.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c index 2784a88e85..72d1eb888d 100644 --- a/ext/objspace/objspace.c +++ b/ext/objspace/objspace.c @@ -998,6 +998,7 @@ Init_objspace(void) * You can use the #type method to check the type of the internal object. */ rb_cInternalObjectWrapper = rb_define_class_under(rb_mObjSpace, "InternalObjectWrapper", rb_cObject); + rb_undef_alloc_func(rb_cInternalObjectWrapper); rb_define_method(rb_cInternalObjectWrapper, "type", iow_type, 0); rb_define_method(rb_cInternalObjectWrapper, "inspect", iow_inspect, 0); rb_define_method(rb_cInternalObjectWrapper, "internal_object_id", iow_internal_object_id, 0); |