From: Clemens Hintze Date: 2000-03-25T08:44:43+01:00 Subject: [ruby-talk:02152] begin/else Dave Thomas writes: > > Guess what I'm documenting today ;-) > > Is there any difference at all between > > begin > codeA > rescue > ... > else > codeB > end > > and > > begin > codeA > codeB > rescue > ... > end > > (assuming codeB doesn't throw an exception?) All exceptions that occure in the 'else' part will not be catched by the 'rescue' clauses of that 'begin'...'end' construct. That is indicated by requiring that the 'else' clause have to come after *all* 'rescue' clauses. So, as you assume codeB will not throw an exception, there is no difference except that codeB is not potentially protected. BTW: You said that you would include the begin : end until ... construct in the FAQ. Will you also document it in the book? > > > Dave > \cle -- Clemens Hintze mailto: c.hintze@gmx.net