Merge pull request #387 from spiritloose/mrb_load_return_value

mrb_load_* should return value
This commit is contained in:
Yukihiro "Matz" Matsumoto
2012-07-19 22:32:55 -07:00
+1 -1
View File
@@ -4889,7 +4889,7 @@ load_exec(mrb_state *mrb, parser_state *p, mrbc_context *c)
if (c->no_exec) return mrb_fixnum_value(n);
}
v = mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_top_self(mrb));
if (!mrb->exc) return mrb_undef_value();
if (mrb->exc) return mrb_undef_value();
return v;
}