From: "T. Onoma" Date: 2003-12-17T21:53:01+09:00 Subject: Re: UnboundMethods Useless? On Wednesday 17 December 2003 01:17 pm, Chad Fowler wrote: > On Wed, 17 Dec 2003, T. Onoma wrote: > > # Ah ha! I see, by putting the method in Object you get a sort-of universal > # method since everthing is an Object. Nice. Makes me wonder why the class > # restiriction exists at all then. > # > > Which class restriction? irb(main):001:0> class A irb(main):002:1> def x irb(main):003:2> print "Y" irb(main):004:2> end irb(main):005:1> end => nil irb(main):006:0> class B irb(main):007:1> end => nil irb(main):008:0> u = A.instance_method(:x) => # irb(main):009:0> u.bind(B) TypeError: bind argument must be an instance of A from (irb):9:in `bind' from (irb):9 -- T.