This PR tweaks how #405 was implemented, so that it achieves the same effect, but without needing the inspected object to implement #method.
This is done by using Kernel's implementation of #method, and using it with any kind of object.
I ran into this from trying to make a BasicObject subclass awesome-printable. To make it work, you need to define #ai, #class, #object_id and #method. After this change, only the first of those 3 are necessary.
This PR tweaks how #405 was implemented, so that it achieves the same effect, but without needing the inspected object to implement
#method
.This is done by using
Kernel
's implementation of#method
, and using it with any kind of object.I ran into this from trying to make a
BasicObject
subclass awesome-printable. To make it work, you need to define#ai
,#class
,#object_id
and#method
. After this change, only the first of those 3 are necessary.