On 2007-01-05 16:07:15 +0100, Carlos <angus / quovadis.com.ar> said: > Josselin wrote: > >> In all examples I can see in my book about 'case ..' 'when..' 'then.. ' >> there is only one statement after the 'when..' I understand using >> 'then' if the statement is on the same line as 'when', BUT >> can I write multiple statements after the 'when' ? >> >> like that : >> >> case 'a' >> when 'a1' >> puts.. >> puts ... >> return >> when 'a2' >> puts ... >> puts ... >> puts ... >> return >> when 'a3' then puts ... >> else >> puts ... >> puts ... >> end > > Try it! a return was missing to close the latest 'else'.... got it...