From b10b51225e039ccddd0ae1e68b66f731bfd8e40c Mon Sep 17 00:00:00 2001 From: normal Date: Tue, 30 Jan 2018 19:35:12 +0000 Subject: proc: fix super_method segfault after bind * proc.c: handle undefined iclass [ruby-core:85231] [Bug #14421] From: Eric Wong git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- proc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'proc.c') diff --git a/proc.c b/proc.c index 4f909dac4b..86610ddfd8 100644 --- a/proc.c +++ b/proc.c @@ -2725,6 +2725,7 @@ method_super_method(VALUE method) TypedData_Get_Struct(method, struct METHOD, &method_data_type, data); iclass = data->iclass; + if (!iclass) return Qnil; super_class = RCLASS_SUPER(RCLASS_ORIGIN(iclass)); mid = data->me->called_id; if (!super_class) return Qnil; -- cgit v1.2.3