diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-20 13:41:29 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-20 13:41:29 +0000 |
commit | 48c89a1e79d08b81830534de2e85a687147370d8 (patch) | |
tree | 2aa6690b65974bc85de2711e7ad4c5483df538ab | |
parent | 87919b91a3482f34e54014f89cffefaf9d0ea6b3 (diff) | |
download | ruby-48c89a1e79d08b81830534de2e85a687147370d8.tar.gz ruby-48c89a1e79d08b81830534de2e85a687147370d8.tar.xz ruby-48c89a1e79d08b81830534de2e85a687147370d8.zip |
* eval.c (eval_under_i): evaluate source in caller's frame.
[ruby-dev:28076]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Dec 20 22:41:17 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * eval.c (eval_under_i): evaluate source in caller's frame. + [ruby-dev:28076] + Tue Dec 20 12:53:23 2005 why the lucky stiff <why@ruby-lang.org> * ext/syck/rubyext.c (syck_emitter_reset): to ensure compatibility @@ -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]); } |