Integrate `kazuho/mruby-class-new-fiber-safe` in the master.
Avoid calling `initialize` via `mrb_funcall`, which cause `cross C
boundary` error from Fibers started in the method.
MODIFY
mrblib/00class.rb
mrblib/00class.rb
+class Class
+ def new(*args, &block)
+ obj = self.allocate
+ obj.initialize(*args, &block)
+ obj
+ end
+end
+
class Module
# 15.2.2.4.12
def attr_accessor(*names)

MODIFY
src/class.c
src/class.c
@@ -2159,6 +2159,7 @@ mrb_init_class(mrb_state *mrb)
mrb_define_method(mrb, bob, "instance_eval", mrb_obj_instance_eval, MRB_ARGS_ANY()); /* 15.3.1.3.18 */
mrb_define_class_method(mrb, cls, "new", mrb_class_new_class, MRB_ARGS_OPT(1));
+ mrb_define_method(mrb, cls, "allocate", mrb_instance_alloc, MRB_ARGS_NONE());
mrb_define_method(mrb, cls, "superclass", mrb_class_superclass, MRB_ARGS_NONE()); /* 15.2.3.3.4 */
mrb_define_method(mrb, cls, "new", mrb_instance_new, MRB_ARGS_ANY()); /* 15.2.3.3.3 */
mrb_define_method(mrb, cls, "initialize", mrb_class_initialize, MRB_ARGS_OPT(1)); /* 15.2.3.3.1 */

Integrate `kazuho/mruby-class-new-fiber-safe` in the master.

Avoid calling `initialize` via `mrb_funcall`, which cause `cross C
boundary` error from Fibers started in the method.