From: "Brian Schröder" Date: 2004-11-25T20:58:55+09:00 Subject: Re: [Solution] Object Browser (#8) On Thu, 25 Nov 2004 18:02:43 +0900 Brian Schr�der wrote: > On Thu, 25 Nov 2004 09:49:47 +0900 > James Edward Gray II wrote: > > > Since we're talking... > > > > I want to avoid embarrassing myself in the summary again by claiming to > > know your code better than you, so I'll embarrass myself in this thread > > with all of Ruby Talk looking on. See the question in the comment > > below: > > > > def object_browser(classtree = ClassTreeNode.new(Kernel)) > > ObjectSpace.each_object do | x | > > classnode = classtree # <- This line truly isn't needed, right??? > > x.class.ancestors.reverse[1..-1].inject(classtree){ | classnode, > > klass | classnode.add_class(klass) }.add_object(x) > > end > > classtree > > end > > > > Tell me I'm right this time, even if you need to lie to me. It's good > > for my ego. > > > > I'd say with all your contributions your ego should be floating quite high ;) > > Well, it seems that this line truly is a leftover from my experiments. I'm shure you will find lots of junk in the solution. The new solution should contain less junk, so please put a disclaimer about "experimental alpha junk" into the summary if you are talking about my first version. > After reading this again, I want to stress that I'm very happy if someone criticizes my code or points me to weaknesses. I'm doing this to learn, not to boost. (It is always difficult to find the right tone in emails ;) Regards, Brian -- Brian Schr�der http://ruby.brian-schroeder.de/