From: Tom Jordan Date: 2006-08-11T12:22:00+09:00 Subject: Re: nonce Instead of a singleton class how about using it to denote code that is executed only the first time it is processed. def learn_leason nounce { touch :hand => :stove_top; puts 'Ouch' } touch :hand => :cool_water; puts 'Ahhh' end loop { learn_leason } Output: Ouch Ahhh Ahhh Ahhh .... or even like this loop { nounce { index = 0 } do_something_useful index += 1 } -- Tom. -- "Nothing will ever be attempted, if all possible objections must first be overcome." - Samuel Johnson "Luck is what happens when preparation meets opportunity." - Seneca