拿
class A; def foo; end; end
class B < A; end
b = B.new # => #<B:0x0000000243b8c0>
m = b.method :foo # => #<Method: B(A)#foo>
m.owner # => A
m.receiver # => #<B:0x0000000243b8c0>
m.receiver.class # => B
mm = m.unbind # => #<UnboundMethod: B(A)#foo>
我怎么B
能从mm
缺少解析结果中得到mm.to_s
?