remove_class_variable(p1) public

Removes the definition of the sym, returning that constant’s value.

   class Dummy
     @@var = 99
     puts @@var
     remove_class_variable(:@@var)
     puts(defined? @@var)
   end

produces:

   99
   nil
Show source
Register or log in to add new notes.