aboutsummaryrefslogtreecommitdiffstats
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
commite4ff461d0f7266d860df0ec1152c185e99cf84b9 (patch)
treeb444a4387f5e6152d589ae85bfe0758113dc5605 /proc.c
parentdab7362b04aadd7ba9aea1e129edaca08e16702c (diff)
downloadruby-e4ff461d0f7266d860df0ec1152c185e99cf84b9.tar.gz
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);