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 | 7c52d5f8cf2987ceddf8e70ae99c11ac22a0a056 (patch) | |
tree | 2aa6690b65974bc85de2711e7ad4c5483df538ab | |
parent | cda674e39cec9ea7a9ba2274ffbe656bc6a3fd43 (diff) | |
download | ruby-7c52d5f8cf2987ceddf8e70ae99c11ac22a0a056.tar.gz |
* 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
-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]); } |