diff options
| author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-04 05:58:06 +0000 |
|---|---|---|
| committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-04 05:58:06 +0000 |
| commit | 16c15ee011b9f5184e8f59d707dfa2f774eb66fe (patch) | |
| tree | 3c8c7ee6f4dbd8c3d157f3c0af01a7e4caf8c9bb | |
| parent | ac2c2e1949e3ef3f1b73d6547c9424a055d2b301 (diff) | |
| download | ruby-16c15ee011b9f5184e8f59d707dfa2f774eb66fe.tar.gz ruby-16c15ee011b9f5184e8f59d707dfa2f774eb66fe.tar.xz ruby-16c15ee011b9f5184e8f59d707dfa2f774eb66fe.zip | |
* eval.c (proc_invoke): use volatile `tmp' rather than `args'.
[ruby-core:03882]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | eval.c | 7 |
2 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Sat Dec 4 14:54:52 2004 WATANABE Hirofumi <eban@ruby-lang.org> + + * eval.c (proc_invoke): use volatile `tmp' rather than `args'. + [ruby-core:03882] + Sat Dec 4 14:28:56 2004 Dave Thomas <dave@pragprog.com> * lib/rdoc/code_objects.rb (RDoc::Context::Section::set_comment): @@ -8139,6 +8139,7 @@ proc_invoke(proc, args, self, klass) volatile int safe = ruby_safe_level; volatile VALUE old_wrapper = ruby_wrapper; volatile int pcall, avalue = Qtrue; + volatile VALUE tmp = args; if (rb_block_given_p() && ruby_frame->last_func) { if (klass != ruby_frame->last_class) @@ -8163,9 +8164,9 @@ proc_invoke(proc, args, self, klass) _block = *data; if (self != Qundef) _block.frame.self = self; if (klass) _block.frame.last_class = klass; - _block.frame.argc = RARRAY(args)->len; - _block.frame.argv = ALLOCA_N(VALUE, RARRAY(args)->len); - MEMCPY(_block.frame.argv, RARRAY(args)->ptr, VALUE, RARRAY(args)->len); + _block.frame.argc = RARRAY(tmp)->len; + _block.frame.argv = ALLOCA_N(VALUE, RARRAY(tmp)->len); + MEMCPY(_block.frame.argv, RARRAY(tmp)->ptr, VALUE, RARRAY(tmp)->len); _block.frame.flags = FRAME_ALLOCA; ruby_block = &_block; |
