I'm passing a method from one class to another.
#!/usr/bin/env ruby
class A
def m
p self
end
end
class B
end
B.define_method :m, &A.new.method(:m)
B.new.m # => #<A:0x00007fb28903e3f8>
Why is the method still related to A, not to B? How can i achieve this?