merges r22275 from trunk into ruby_1_9_1.

* vm_eval.c (eval_string_with_cref): use rb_vm_get_ruby_level_next_cfp()
  instead of vm_get_ruby_level_caller_cfp().  checking a upper frame
  is not enough.  [ruby-dev:37984]
* proc.c, vm_core.h: declare rb_vm_get_ruby_level_next_cfp()
  on vm_core.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2009-02-22 12:49:28 +00:00
parent c7782f91c8
commit 174eed3541
4 changed files with 11 additions and 3 deletions

View file

@ -704,7 +704,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, const char
th->base_block = &env->block;
}
else {
rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(th, th->cfp);
rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp);
if (cfp != 0) {
block = *RUBY_VM_GET_BLOCK_PTR_IN_CFP(cfp);