Please review and let me know if this is acceptable.
Add top-self "main"
I try to usr global variable instead of instance variable.
introduce toplevel object main; close #327
It is mrb->object_class reference the correct way to add a method to the toplevel object main? For example:
mrb_state *mrb = mrb_open();
mrb_define_method(mrb, mrb->object_class, "sqrt", custom_sqrt, ARGS_REQ(1));
If you want to add global methods (methods available everywhere in your program), yes.
If you want to add singleton methods to the toplevel object main, currently there's no way, right now.
I was trying to create a global method. Thank you.