Hi Ryan,

Thanks for your help.

I tried that, and it didn't work. Here is my irb transcript trying  
that. Is there another way to remove a constant? I thought I had seen  
one in the Pickaxe book, but maybe I was thinking of the module method.

irb
irb(main):001:0> FOO = "my symbol value"
=> "my symbol value"
irb(main):002:0> remove_const(FOO)
NoMethodError: undefined method `remove_const' for main:Object
         from (irb):2
irb(main):003:0> remove_const(:FOO)
NoMethodError: undefined method `remove_const' for main:Object
         from (irb):3
irb(main):004:0> ??


Any other ideas?

Thanks,
Bob Evans


On Nov 14, 2005, at 1:44 PM, Ryan Leavengood wrote:

> On 11/14/05, Robert Evans <robert.evans / acm.org> wrote:
>>
>> I expected the unit test to clean the environment, in lieu of that,
>> how can I undefined const?
>
> ----------------------------------------------------  
> Module#remove_const
>      remove_const(sym)   => obj
> ---------------------------------------------------------------------- 
> --
>      Removes the definition of the given constant, returning that
>      constant's value. Predefined classes and singleton objects  
> (such as
>      _true_) cannot be removed.
>
> You pass it a symbol: remove_const(:VARIABLE)
>
> Ryan
>