diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-04 12:31:23 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-04 12:31:23 +0000 |
commit | 18d1ea6cc83ee236f9d8368fa5cb68af839f03e8 (patch) | |
tree | 5ae581f16c10e4d341e671de64b032f44dc5065a /eval.c | |
parent | b28ac942ef90c255f26c7bbfbf27046740a72da5 (diff) |
merges r23210 from trunk into ruby_1_9_1.
--
* eval.c (ruby_cleanup): the order of local variables on stack is
undefined. should use outermost VALUE for ruby_init_stack.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -13,6 +13,7 @@ #include "eval_intern.h" #include "iseq.h" +#include "gc.h" VALUE proc_invoke(VALUE, VALUE, VALUE, VALUE); VALUE rb_binding_new(void); @@ -82,7 +83,7 @@ ruby_options(int argc, char **argv) int state; void *tree = 0; - Init_stack((void *)&state); + Init_stack((void *)&tree); PUSH_TAG(); if ((state = EXEC_TAG()) == 0) { SAVE_ROOT_JMPBUF(GET_THREAD(), tree = ruby_process_options(argc, argv)); @@ -135,7 +136,7 @@ ruby_cleanup(int ex) errs[1] = th->errinfo; th->safe_level = 0; - Init_stack((void *)&state); + Init_stack(&errs[STACK_UPPER(errs, 0, 1)]); PUSH_TAG(); if ((state = EXEC_TAG()) == 0) { @@ -631,7 +632,7 @@ rb_rescue(VALUE (* b_proc)(ANYARGS), VALUE data1, VALUE rb_protect(VALUE (* proc) (VALUE), VALUE data, int * state) { - VALUE result = Qnil; /* OK */ + volatile VALUE result = Qnil; int status; rb_thread_t *th = GET_THREAD(); rb_control_frame_t *cfp = th->cfp; |