diff --git a/Hello-World.md b/Hello-World.md index a6fff2d..aa72893 100644 --- a/Hello-World.md +++ b/Hello-World.md @@ -1,4 +1,3 @@ -``` c #include #include @@ -6,7 +5,7 @@ #include #include #include -// to be eventually replaced by #include +// to be replaced by #include #include int main(void) @@ -14,15 +13,14 @@ int main(void) struct mrb_parser_state *p; mrb_state *mrb = mrb_open(); char code[] = "p 'hello world!'"; - printf("Executing code with mruby!\n"); + printf("Executing Ruby code from C!\n"); p = mrb_parse_string(mrb, code); int n; n = mrb_generate_code(mrb, p->tree); mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_top_self(mrb)); if (mrb->exc) { - mrb_funcall(mrb, mrb_nil_value(), "p", 1, mrb_obj_value(mrb->exc)); + mrb_p(mrb, mrb_obj_value(mrb->exc)); } return 0; } -``` \ No newline at end of file