Unverified Commit e9245016 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #3964 from take-cheeze/patch-1

Close `mrb_state` before error exit.
parents 10f28fc8 0f5cf385
......@@ -31,6 +31,7 @@ mrb_init_mrbtest(mrb_state *mrb)
if (mrb->exc) {
mrb_print_error(mrb);
mrb_close(mrb);
exit(EXIT_FAILURE);
}
mrb_close(core_test);
......
......@@ -101,6 +101,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
end
f.puts %Q[ if (mrb2->exc) {]
f.puts %Q[ mrb_print_error(mrb2);]
f.puts %Q[ mrb_close(mrb2);]
f.puts %Q[ exit(EXIT_FAILURE);]
f.puts %Q[ }]
f.puts %Q[ mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern_lit(mrb2, "GEMNAME"), mrb_str_new(mrb2, "#{g.name}", #{g.name.length}));]
......
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