summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-20 13:41:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-20 13:41:29 +0000
commit7c52d5f8cf2987ceddf8e70ae99c11ac22a0a056 (patch)
tree2aa6690b65974bc85de2711e7ad4c5483df538ab /eval.c
parentcda674e39cec9ea7a9ba2274ffbe656bc6a3fd43 (diff)
* eval.c (eval_under_i): evaluate source in caller's frame.
[ruby-dev:28076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 3ff37334a5..7fde742b2a 100644
--- a/eval.c
+++ b/eval.c
@@ -6315,7 +6315,11 @@ static VALUE
eval_under_i(VALUE arg)
{
VALUE *args = (VALUE *)arg;
+ struct FRAME *f = ruby_frame;
+ if (f && (f = f->prev) && (f = f->prev)) {
+ ruby_frame = f;
+ }
return eval(args[0], args[1], Qnil, (char*)args[2], (int)args[3]);
}