[ruby-core:112721] [Ruby master Bug#19482] Fix crash when allocating classes with newobj hook