In Message-Id: <e86cebfb041009130540c16815 / mail.gmail.com> Matt Maycock <ummaycoc / gmail.com> writes: > def handle.add > unless block_given? then > @done[] > @error[ArgumentError, 'Block not given for Plot # data # > handle.add. A block is required.'] > end > > file = Tempfile.new('plotdata') > filehandle, point = Object.new, @point > filehandle.singleton_def(:puts) {|*points| > file.puts(point[*points]) > } > > yield filehandle > file.close(false) > > @debug[:data_file, File.readlines(file.path).map {|l| l.chomp}] > @add[file] > end For my eyes @done, @error, @debug and @add are a some object which has method `[]', that do other than reference a something they contain. They are probably not an Array or Hash or Set or ...., right? If @add[file] does not store file anywhere, file can be GCed after handle.add (hmm add is a singleton method of handle?) and a corresponding temporary file is deleted by finalizer of Tempfile. -- kjana / dm4lab.to October 10, 2004 Time and tide wait for no man.