On Sun, Aug 25, 2002 at 07:31:13AM +0900, Joel VanderWerf wrote: > > Here's an example of the data stream approach. > > require 'roof/datastream' # from Roof on RAA > > DataStream.open($0, "r+") do |data| > while line = data.gets and line != "__END__\n" > ## maybe you can do this by seeking to __DATA__.pos, > ## but that doesn't seem to work in Ruby 1.6.7 > end DATA.pos works on 1.6.7 unix. Jim > > data.substream do > # within this block, data behaves exactly as if everything before > # the current pos (which is just after __END__) was deleted. > data.print "Here is some data" > end > end > > __END__ > > -- Jim Freeze If only I had something clever to say for my comment... ~