From: "Anders Strandløv Elkjær" Date: 2001-01-12T05:22:33+09:00 Subject: [ruby-talk:9153] what about this begin? Hiyas. I am a bit puzzled about the use of 'do', 'begin' and 'end'. Why do you sometimes need the begin and other times not. Check the following code: --------------- def run loop do (**) # Why no begin here? Thread.start(@listen.accept) do |aConnection| begin # HERE: Why do I need this begin and why # not one above at (**) too?? session = WebSession.new(aConnection) request = [] loop do str = aConnection.gets line = str.chomp("\r\n") break if line.length == 0 request << line end session.standardPage("Your Request") { "

Your request was:

\n" + request.join('
') + "

Thank you for testing our system." } ensure aConnection.close end end end end --------------- Thanks. -Anders.