Eero Saynatkari wrote: > 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? I don't get it... light_switch = dark should be the same as light_switch=false light_switch=light_switch.switch if dark==true right? (and *please* don't compare to 'true' if something is true, it *is* already true, comparing it with true doesn't change that - never) also light_switch = !light_switch should 'switch' the switch, right? puzzled, or did i missed the joke? Simon