Steve Tuckner <STUCKNER / MULTITECH.COM> wrote in message news:<009701c258d6$4f2f49e0$6904a8c0 / multitech.prv>... > How do I find all occurances of in the code where objects of type Foo > are doing foo[index]? Searching for [] is no help because that is likely > all over the code. There are no type declarations to find instances of > foo. I can search for Foo.new and follow it through functions, etc but > that is often not simple. > > Unit tests are helpful to see if my code still works, but even with them > I don't feel completely secure that I have caught all instances. hmm. I tend to write extra unit tests in ruby, so that I can have confidence that they walk over all branches of the code. I wouldn't worry to much about it if you deleted the [] method. You know that it will crash hard, and the thrown NameError will tell you exactly where, so if it does happen it won't be a hard bug to fix. ~ Patrick