1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Warn on a finalizer that captures the object to be finalized

Also improve specs and documentation for finalizers and more clearly
recommend a safe code pattern to use them.
This commit is contained in:
Chris Seaton 2020-09-16 19:59:36 +01:00 committed by Aaron Patterson
parent f75009c122
commit 8e173d8b27
Notes: git 2020-09-17 05:52:58 +09:00
4 changed files with 190 additions and 15 deletions

View file

@ -46,6 +46,7 @@ VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE);
VALUE rb_method_call_with_block_kw(int, const VALUE *, VALUE, VALUE, int);
int rb_mod_method_arity(VALUE, ID);
int rb_obj_method_arity(VALUE, ID);
VALUE rb_callable_receiver(VALUE);
VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
RBIMPL_SYMBOL_EXPORT_END()