From: Trans Date: 2005-09-25T00:26:40+09:00 Subject: Re: "once" methods I looked at the RCR, I think once is something a little more low level than memoize: a = nil x = "FOO" 10.times do a = once { "#{x}" } x = "BAR" end p a #=> "FOO" Akin to persistant locals: def x arr = [] %a ||= 0 2.times do arr << %a += 1 end arr end x #=> [1, 2] x #=> [3, 4] Hmm.. actaually this might help solve the whole ||= thing. module def module_info @module_info = once{ {} } end end T.