summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-21 07:08:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-21 07:08:21 +0000
commit2e733be0b2a4f590532a78e4b4539ff539f69d0e (patch)
tree6b4cbc01255694e93c9fcdecc820453c908e059c /proc.c
parenta5e49f99011163ef264cb6ad834496426ff57e85 (diff)
* proc.c (rb_hash_proc): get wrapped pointer properly. [Bug #6048]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/proc.c b/proc.c
index c2859223c5..1ea190c3b3 100644
--- a/proc.c
+++ b/proc.c
@@ -797,7 +797,8 @@ proc_eq(VALUE self, VALUE other)
st_index_t
rb_hash_proc(st_index_t hash, VALUE prc)
{
- const rb_proc_t *proc = (const rb_proc_t *)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.lfp >> 16);
@@ -814,10 +815,8 @@ static VALUE
proc_hash(VALUE self)
{
st_index_t hash;
- rb_proc_t *proc;
- GetProcPtr(self, proc);
hash = rb_hash_start(0);
- hash = rb_hash_proc(hash, proc);
+ hash = rb_hash_proc(hash, self);
hash = rb_hash_end(hash);
return LONG2FIX(hash);
}