From: ts Date: 2002-12-07T00:05:43+09:00 Subject: Re: Newbie: Can some briefly compare raise and throw for me? Thx! >>>>> "c" == christopher j meisenzahl writes: c> Re: Newbie: Can some briefly compare raise and throw for me? Thx! it's best when the text is in the body :-))) briefly pigeon% cat b.rb #!/usr/bin/ruby def tt throw :stop end catch(:stop) do tt end p "After" catch(:stop) do Thread.new { tt }.join end p "After" pigeon% pigeon% b.rb "After" ./b.rb:3:in `throw': uncaught throw `stop' in thread 0x81083c8 (ThreadError) from ./b.rb:12:in `join' from ./b.rb:12 from ./b.rb:11:in `catch' from ./b.rb:11 pigeon% pigeon% cat b.rb #!/usr/bin/ruby def tt raise "stop" end tt rescue true p "After" Thread.new { tt }.join rescue true p "After" pigeon% pigeon% b.rb "After" "After" pigeon% Guy Decoux