Commit 5fcd5205 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

small refactoring after mruby coding convention

parent 369b556d
...@@ -810,13 +810,12 @@ mrb_value ...@@ -810,13 +810,12 @@ mrb_value
mrb_class_new_class(mrb_state *mrb, mrb_value cv) mrb_class_new_class(mrb_state *mrb, mrb_value cv)
{ {
mrb_value super; mrb_value super;
if(mrb->ci->argc > 0) { struct RClass *new_class;
mrb_get_args(mrb, "o", &super);
} if (mrb_get_args(mrb, "|o", &super) == 0) {
else {
super = mrb_obj_value(mrb->object_class); super = mrb_obj_value(mrb->object_class);
} }
struct RClass *new_class = mrb_class_new(mrb, mrb_class_ptr(super)); new_class = mrb_class_new(mrb, mrb_class_ptr(super));
return mrb_obj_value(new_class); return mrb_obj_value(new_class);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment