summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-19 15:29:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-19 15:29:01 +0000
commit2d97cee4d57b4f6bc1358c63d8ffd99047e4965e (patch)
treeb444a4387f5e6152d589ae85bfe0758113dc5605 /proc.c
parentea46a6408c15c26e80ceb0a6cdf64be15a8fe03f (diff)
proc.c: fix infinite loop
* proc.c (rb_proc_get_iseq): proc made from symbol does not have iseq. fix infinite loop. [ruby-core:72381] [Bug #11845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/proc.c b/proc.c
index 615a6e9d5a..b8c40a1d84 100644
--- a/proc.c
+++ b/proc.c
@@ -975,7 +975,6 @@ rb_proc_get_iseq(VALUE self, int *is_proc)
const rb_proc_t *proc;
const rb_iseq_t *iseq;
- again:
GetProcPtr(self, proc);
iseq = proc->block.iseq;
if (is_proc) *is_proc = !proc->is_lambda;
@@ -990,8 +989,7 @@ rb_proc_get_iseq(VALUE self, int *is_proc)
return iseq;
}
else if (SYMBOL_P(iseq)) {
- self = rb_sym_to_proc((VALUE)iseq);
- goto again;
+ return NULL;
}
else {
return rb_iseq_check(iseq);