summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-21 04:36:00 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-21 04:36:00 +0000
commitaa58701dee09d609b792d1414a092d9e662f37da (patch)
treec9b70bf40606a66d77b932c35e77edbfe6e017ed /proc.c
parent18b6b67233a923b53d46533f8fa5db05e7b2fe71 (diff)
merge revision(s) 62115: [Backport #14421]
proc: fix super_method segfault after bind * proc.c: handle undefined iclass [ruby-core:85231] [Bug #14421] From: Eric Wong <e@80x24.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@62507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/proc.c b/proc.c
index 9dbc78ae4a..0e0d3d6508 100644
--- a/proc.c
+++ b/proc.c
@@ -2720,6 +2720,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;