mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
allocate object after mrb_get_args()
This commit is contained in:
+1
-1
@@ -1076,8 +1076,8 @@ mrb_instance_new(mrb_state *mrb, mrb_value cv)
|
||||
mrb_value *argv;
|
||||
mrb_int argc;
|
||||
|
||||
obj = mrb_instance_alloc(mrb, cv);
|
||||
mrb_get_args(mrb, "*&", &argv, &argc, &blk);
|
||||
obj = mrb_instance_alloc(mrb, cv);
|
||||
mrb_funcall_with_block(mrb, obj, mrb_intern_lit(mrb, "initialize"), argc, argv, blk);
|
||||
|
||||
return obj;
|
||||
|
||||
Reference in New Issue
Block a user