In article <cfe1i1$126$1 / news.doit.wisc.edu>,
DaZoner <nobody / nowhere.com> wrote:
>
>I've defined a class I use that strips methods off of a class (specified by
>a string representing the class name). I use it maybe 30 times during my
>application run. However I'm concerned because it does an
>ObjectSpace.each(Class) call to make sure the specified class exists before
>trying to remove any methods. Will this call get slow as a few arrays
>containing perhaps a million FixNums get defined by the application in
>between calls? 

Since you specified Class as the argument to ObjectSpace.each it shouln't 
be including Fixnums in the list that gets iterated - only classes.

>The array's data stays around as the calls to my class are
>made. I've included the source of the class below. If anyone knows an
>efficient way to determine if a class exists given its name in String form
>I'd sure appreciate seeing it.
>

I'm not sure if it would be faster (you'll have to experiment) but maybe 
'defined?' would work.

  if defined? @classname



Phil