Applied in changeset commit:git|851b8f852313c361465cf760701e23db0ea4d474. ---------- Remove class alloc check This checks that the value returned from the function registered with rb_define_alloc_func is of the correct class. When this...jhawthorn (John Hawthorn)
This checks that the value returned from the function registered with rb_define_alloc_func is of the correct class. When this was first introduced in 1fe40b7cc5 (by Matz on 2001-10-03), allocation was done via user-defined Object#allocat...jhawthorn (John Hawthorn)
I want to remove the following runtime check in `class_call_alloc_func`, replacing it with a `RUBY_ASSERT` (so we would still have the check, but only on a debug build). ``` if (rb_obj_class(obj) != rb_class_real(klass)) { rb_ra...jhawthorn (John Hawthorn)
Just for the record, this code should not hang and the fix is good, but the pattern in the reproduction isn't safe. The defined finalizer could potentially be run on any thread including the wait_thread, which would result in the erro...jhawthorn (John Hawthorn)
We should never initialize a class with an existing singleton class (singleton classes definitionally should not be shared). The only cases this happened in Ruby itself is methods, which exposes a bug that dup did not behave correctly.jhawthorn (John Hawthorn)
Copy the allocator from superclass to subclass at class creation time, so rb_get_alloc_func no longer needs to walk the ancestor chain. This expands on 68ffc8db088a7b29613a3746be5cc996be9f66fe, which did this copy, but only for classes ...jhawthorn (John Hawthorn)
Eregon (Benoit Daloze) wrote: > `Class#new`, `dup`, `clone` and `Marshal` always use the internal alloc function, because they guarantee to call `initialize`, `initialize_dup` or `initialize_clone`. Users have control over `initial...jhawthorn (John Hawthorn)