summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-14 17:59:03 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-14 17:59:03 (GMT)
commit994460c4db639d098ec72ca54b3442f5ea05336f (patch)
tree07c1f5969ade76aaae767bcc660ead39da4e7091 /proc.c
parente07dad00ee37173a990cc8d4f147963d7f57a28c (diff)
* vm_core.h, vm.c: remove rb_proc_t::envval because we can know it via
rb_proc_t::block::ep. rb_vm_proc_envval(const rb_proc_t *proc) returns an Env object which the Proc object use. * proc.c: catch up this fix. * vm_dump.c (rb_vmdebug_proc_dump_raw): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/proc.c b/proc.c
index 1405c19..f1fd3ce 100644
--- a/proc.c
+++ b/proc.c
@@ -46,10 +46,9 @@ static void
proc_mark(void *ptr)
{
rb_proc_t *proc = ptr;
- RUBY_MARK_ENTER("proc");
- RUBY_MARK_UNLESS_NULL(proc->envval);
RUBY_MARK_UNLESS_NULL(proc->block.proc);
RUBY_MARK_UNLESS_NULL(proc->block.self);
+ RUBY_MARK_UNLESS_NULL(rb_vm_proc_envval(proc));
if (proc->block.iseq && RUBY_VM_IFUNC_P(proc->block.iseq)) {
RUBY_MARK_UNLESS_NULL((VALUE)(proc->block.iseq));
}
@@ -670,7 +669,7 @@ rb_block_clear_env_self(VALUE proc)
rb_proc_t *po;
rb_env_t *env;
GetProcPtr(proc, po);
- GetEnvPtr(po->envval, env);
+ GetEnvPtr(rb_vm_proc_envval(po), env);
env->env[0] = Qnil;
return proc;
}
@@ -1021,7 +1020,6 @@ rb_hash_proc(st_index_t hash, VALUE prc)
rb_proc_t *proc;
GetProcPtr(prc, proc);
hash = rb_hash_uint(hash, (st_index_t)proc->block.iseq);
- hash = rb_hash_uint(hash, (st_index_t)proc->envval);
return rb_hash_uint(hash, (st_index_t)proc->block.ep >> 16);
}
@@ -2533,7 +2531,7 @@ proc_binding(VALUE self)
rb_binding_t *bind;
GetProcPtr(self, proc);
- envval = proc->envval;
+ envval = rb_vm_proc_envval(proc);
iseq = proc->block.iseq;
if (RUBY_VM_IFUNC_P(iseq)) {
if (IS_METHOD_PROC_ISEQ(iseq)) {