diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2013-01-16 18:38:53 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2013-01-16 18:38:53 +0900 |
| commit | 600d4f9ed17f02ed0e5e9355ae1ca7a249f78e05 (patch) | |
| tree | 84a2649a052b489804146c4a19136f45d2892e8a /tools | |
| parent | 5166aa726df2281539183094b160806f008d352b (diff) | |
| download | mruby-600d4f9ed17f02ed0e5e9355ae1ca7a249f78e05.tar.gz mruby-600d4f9ed17f02ed0e5e9355ae1ca7a249f78e05.zip | |
save/restore arena index in mirb; close #740
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mirb/mirb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/mirb/mirb.c b/tools/mirb/mirb.c index b89c63cff..85c3249d2 100644 --- a/tools/mirb/mirb.c +++ b/tools/mirb/mirb.c @@ -159,6 +159,7 @@ main(void) mrb_value result; int n; int code_block_open = FALSE; + int ai; print_hint(); @@ -172,6 +173,7 @@ main(void) cxt = mrbc_context_new(mrb); cxt->capture_errors = 1; + ai = mrb_gc_arena_save(mrb); while (TRUE) { #ifndef ENABLE_READLINE print_cmdline(code_block_open); @@ -253,6 +255,7 @@ main(void) ruby_code[0] = '\0'; last_code_line[0] = '\0'; mrb_parser_free(parser); + mrb_gc_arena_restore(mrb, ai); } } mrbc_context_free(mrb, cxt); |
