mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
main.to_s should also return "main"
This commit is contained in:
@@ -170,6 +170,7 @@ mrb_top_self(mrb_state *mrb)
|
||||
if (!mrb->top_self) {
|
||||
mrb->top_self = (struct RObject*)mrb_obj_alloc(mrb, MRB_TT_OBJECT, mrb->object_class);
|
||||
mrb_define_singleton_method(mrb, mrb->top_self, "inspect", inspect_main, ARGS_NONE());
|
||||
mrb_define_singleton_method(mrb, mrb->top_self, "to_s", inspect_main, ARGS_NONE());
|
||||
}
|
||||
return mrb_obj_value(mrb->top_self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user