From: mental@... Date: 2006-02-18T09:07:19+09:00 Subject: Re: [QUIZ] metakoans.rb (#67) Quoting ara.t.howard@noaa.gov: > On Sat, 18 Feb 2006, Patrick Hurley wrote: > > > Thanks ok last question (probalby), if remove_instance_variable > > is called, and the attribute is subsequently accessed is it > > reset to the default value? > > good question. my version does not - the default is set once > only. i would think re-setting an @var when > remove_instance_variable has been called would be suprising > behaviour - but it's up to you. Depends. If you think of it in terms of the default value being shadowed by @var if it exists, returning to the default value after a remove_instance_variable would seem reasonable. This indirectly brings to mind another question, though -- when and how often is the block supposed to be called, if given? Once? Per-class? Per-object? Per-get? -mental