From: Markus Koenig Date: 2005-10-07T06:11:53+09:00 Subject: Re: HighLine Issue (was Re: Lisp Game (#49)) Hello James, I really appreciate your and Greg's work. It's nice to see what can evolve from a simple quiz idea. :) > I'm very interested in understanding this problem and fixing it > correctly. Could you please show a trivial HighLine script and how > you are trying to use it, so I can wrap my head around this? I think HighLine's methods should either raise EOFError or return nil if EOF is reached, but I'm not sure which one would be nicer. Maybe a hybrid approach, like IO#gets and IO#readline? The trivial script, if the methods return nil: require 'highline/import' loop do name = ask("What's your name?") if response.nil? or response == 'exit' puts 'Goodbye, dear friend.' exit else puts "Hello, #{name}!" end end I expect this program to behave like most Unix shells - quietly quit when one presses Ctrl-D (EOF). But this would print a stack trace, as shown earlier. Thanks, Markus