[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:02151] Re: begin/else

From: "Dat Nguyen" <thucdat@...>
Date: 2000-03-25 03:10:26 UTC
List: ruby-talk #2151

>From: Dave Thomas <Dave@thomases.com>
>Reply-To: ruby-talk@netlab.co.jp
>To: ruby-talk@netlab.co.jp (ruby-talk ML)
>Subject: [ruby-talk:02149] begin/else
>Date: 24 Mar 2000 20:22:35 -0600
>
>
>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?)
>
>
>Dave

I guess:

In the first case, if codeA throws an exception, codeB won't be  executed at 
all.

In the second case, codeB will be executed anyway no matter if codeA throws 
an exception or not.

Dat
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

In This Thread

Prev Next