andy / rusterholz.org wrote:
> Note: the above failing code correctly returns nil on a coworker's machine
> running `ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin17]`.

Thanks for simple test case, I guess the following patch is correct:
(sorry, I don't use "bind" or "super_method" at all, so maybe
there's other problems but "make exam" passes for me)

```
--- 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;
```

Full patch + test:
https://80x24.org/spew/20180130004626.17796-1-e / 80x24.org/raw

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>