From: daz Date: 2003-04-27T21:33:00+09:00 Subject: Re: ASCII class inheritance tree generator "Simon Vandemoortele" wrote: > On Sun, 27 Apr 2003 at 07:17 GMT, daz wrote: > > > classTree(Object) > > # -> : undefined method `instance_methods' for nil (NoMethodError) > > Harry Olson caught this one too (see his solution in this thread). Oops, long thread and still 800 unread messages :( > > After adding 'NameError' behind 'rescue' this solution also works here. > I have updated the code on the Wiki page. Glad I didn't update the Wiki with a 1.7+ fix. Thanks. classTree(File) # -> : :41:in `*': negative argument (ArgumentError) maxlength = 0 ... 'nervously' changed here to ... maxlength = root.to_s.length ... without fully understanding the consequences. Cheers, daz