On 2006.01.22 04:31, Dirk Meijer wrote:
> > er, the global value 'true' is the only instance of TrueClass.  so,
> > doing true.switch! would make true become false?
> >
> > So then,
> > if 1 == 1
> > puts "hi"
> > end
> >
> > Wouldn't print anything?
> 
> 
> that, on second thought, probably wouldn't work, and the following would
> have to be used:
> 
> light_switch=false
> light_switch=light_switch.switch if dark==true

I think here is where a Symbol would be most fitting ;)

  light_switch  = :off
  light_switch  = :on if dark?
  

E