diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-08-20 23:38:49 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-08-20 23:38:49 +0900 |
| commit | e73a0913430fbffcf5ec741055dfdc6146fa743c (patch) | |
| tree | 672bd9cb5d67c17023e39bdab72f625760cba24b /tasks | |
| parent | c7fda2232b690f5e68a5d1f72e9dc8cd21682703 (diff) | |
| parent | 05ede52239fce58b6a8be4b72d51db10ae1c2632 (diff) | |
| download | mruby-e73a0913430fbffcf5ec741055dfdc6146fa743c.tar.gz mruby-e73a0913430fbffcf5ec741055dfdc6146fa743c.zip | |
Merge branch 'cubicdaiya-issues/scope_new_error_handlings'
Diffstat (limited to 'tasks')
| -rw-r--r-- | tasks/mrbgem_spec.rake | 1 | ||||
| -rw-r--r-- | tasks/mrbgems_test.rake | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tasks/mrbgem_spec.rake b/tasks/mrbgem_spec.rake index 1d97e2bbf..95e1c5f02 100644 --- a/tasks/mrbgem_spec.rake +++ b/tasks/mrbgem_spec.rake @@ -183,6 +183,7 @@ module MRuby def print_gem_test_header(f) print_gem_comment(f) + f.puts %Q[#include <stdio.h>] f.puts %Q[#include <stdlib.h>] f.puts %Q[#include "mruby.h"] f.puts %Q[#include "mruby/irep.h"] diff --git a/tasks/mrbgems_test.rake b/tasks/mrbgems_test.rake index f3496dc8d..016379197 100644 --- a/tasks/mrbgems_test.rake +++ b/tasks/mrbgems_test.rake @@ -47,6 +47,10 @@ MRuby.each_target do g.test_rbfiles.count.times do |i| f.puts %Q[ ai = mrb_gc_arena_save(mrb);] f.puts %Q[ mrb2 = mrb_open_core(mrb_default_allocf, NULL);] + f.puts %Q[ if (mrb2 == NULL) {] + f.puts %Q[ fprintf(stderr, "Invalid mrb_state, exiting \%s", __FUNCTION__);] + f.puts %Q[ exit(EXIT_FAILURE);] + f.puts %Q[ }] dep_list.each do |d| f.puts %Q[ GENERATED_TMP_mrb_#{d.funcname}_gem_init(mrb2);] f.puts %Q[ mrb_state_atexit(mrb2, GENERATED_TMP_mrb_#{d.funcname}_gem_final);] |
