On Sat, Aug 04, 2001 at 11:11:50PM +0900, Harry Ohlsen wrote:
> Chris Moline wrote:
> 
> > Are you sure you are getting the input after printing the prompt?? May I
> > see more of your code??
> 
> Sure. This is the main loop (the current version) ...
> 
>     while !$stdin.eof
>         print "-> "; STDOUT.sync
>  
>         line = $stdin.gets
> 
>         # Then I do some stuff with the contents of line 
>     end
Ok it has something to do with $stdin.eof. I think what is happening is it is
going to tell you if the *next* read returns eof. Hence you need to enter a line
before it will print a prompt. try something like

while 1
	print "-> "
	break if $stdin.eof
	line = gets
	# ... stuff ...
end