diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-19 15:29:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-19 15:29:01 +0000 |
commit | 2d97cee4d57b4f6bc1358c63d8ffd99047e4965e (patch) | |
tree | b444a4387f5e6152d589ae85bfe0758113dc5605 /proc.c | |
parent | ea46a6408c15c26e80ceb0a6cdf64be15a8fe03f (diff) | |
download | ruby-2d97cee4d57b4f6bc1358c63d8ffd99047e4965e.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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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); |