aboutsummaryrefslogtreecommitdiffstats
path: root/proc.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-30 19:35:12 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-30 19:35:12 +0000
commit4fc3c8e149178162f14e96a549ef22d5aeee4f42 (patch)
treed0c5565298dcc467af9645c4bb1e54ada25303f6 /proc.c
parent0198f4a21e386e736477053890bcf8bfce9afd26 (diff)
downloadruby-4fc3c8e149178162f14e96a549ef22d5aeee4f42.tar.gz
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/trunk@62115 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 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;