From: Mat Schaffer Date: 2006-07-20T21:43:28+09:00 Subject: Re: Newbie - Q: working with files On Jul 20, 2006, at 4:37 AM, Allison Newman wrote: > Hi, > > I have a function with the following code > > def first_parse > @in_file.each_line do |line| > puts line > @line += 1; > tokens = line.split > handle_command(tokens, line) > end > puts "End of file reached" > @heap.dump(@obj_file) > end > > The problem is that I parse the entire file (@in_file), and my app > exits, but I never execute the puts "End of file reached". Anyone > have > any ideas why? I would wonder if something's happening in handle_command. Or maybe there's an output buffering problem going on. You could try '$stdout.sync = true'. But this is all just blind guessing. -Mat