General

Profile

jhawthorn (John Hawthorn)

  • Login: jhawthorn
  • Registered on: 12/22/2016
  • Last sign in: 03/26/2026

Issues

open closed Total
Assigned issues 20 67 87
Reported issues 4 25 29

Projects

Project Roles Registered on
Ruby Committer 11/25/2021

Activity

03/27/2026

05:09 PM Ruby Revision 2e753bf2 (git): Move rb_class_allocate_instance into gc.c
jhawthorn (John Hawthorn)
04:06 PM Ruby Feature #21966 (Closed): Remove rb_obj_class runtime check on rb_define_alloc_func returned objects
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)
04:00 PM Ruby Revision 851b8f85 (git): 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 was first
introduced in 1fe40b7cc5 (by Matz on 2001-10-03), allocation was done
via user-defined Object#allocat...
jhawthorn (John Hawthorn)

03/26/2026

10:25 PM Ruby Feature #21966 (Closed): Remove rb_obj_class runtime check on rb_define_alloc_func returned objects
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)
09:37 PM Ruby Revision 174ace6a (git): Convert K&R function definitions in configure.ac
jhawthorn (John Hawthorn)
06:37 PM Ruby Bug #21926: Thread#value on popen3 wait thread hangs in finalizer
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)

03/25/2026

07:51 PM Ruby Revision 109a20a7 (git): Don't pass singleton to TypedData_Make_Struct
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)
07:51 PM Ruby Revision a0583318 (git): Don't allow RCLASS_ALLOCATOR on a singleton
jhawthorn (John Hawthorn)
07:51 PM Ruby Revision 111215de (git): Copy allocator to subclasses at boot and on change
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)
02:26 AM Ruby Feature #21963: A solution to completely avoid allocated-but-uninitialized objects

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)

Also available in: Atom