From: Rick DeNatale Date: 2009-08-24T21:16:35+09:00 Subject: Re: ruby-debug does not hit breakpoints at class-methods On Sun, Aug 23, 2009 at 11:50 PM, Sys Ppp wrote: > To 7stud. These are all normal, except class-method, as i wrote. > > In you example 'a.sayhi' and especially 'sayhi' - is not correct > refernces to instance metod. But 'A.sayhi' is it. Or 'A:sayhi', or > 'A#sayhi'. > > You should better understand the difference between class and instanse > methods. > > It is all ok. Except subject of these posts. I don't know about rdebug in this case (I can't remember trying to set breakpoints on method names, I usually just use the line number or set the breakpoint in textmate using the rubyamp bundle), but normal nomenclature, given a class A A#meth - refers to an instance method of A A::meth - refers to a class method of A (note the double colon) This is what RI uses. RI also appears to accept A.meth which will give documentation on an instance method named meth is A has one, or if not a class method named meth if there is one. For example ri IO.read gives info on IO#read (IO has both IO::read and IO#read), while IO.select gives info on IO::select And RI doesn't appear to understand A:meth -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale