From: Tietew Date: 2002-12-06T20:24:28+09:00 Subject: Re: on error resume next On Fri, 6 Dec 2002 19:52:16 +0900 In article <200212061052.gB6AqE202961@sharui.nakada.kanuma.tochigi.jp> [Re: on error resume next] nobu.nokada@softhome.net wrote: > > In the following code, how can I implement the VB "On Error Resume Next" > > in ruby? > > I'm not sure why you want a such vice, but what about this? No. :) "On Error Resume Next" depends its static context. ---^ test.vbs Sub Test WScript.Echo "before raise" Err.Raise 1 WScript.Echo "after raise" End Sub On Error Resume Next WScript.Echo "before test" Test WScript.Echo "after test" ---$ D:\> cscript test.vbs before test before raise after test Oh, no! "after raise" is not printed! To print, we have to insert "On Error Resume Next" line after "Sub Test". Ruby cannot simulate this behavior. --[ Tietew ]------------------------------------------------------- Mail: tietew@tietew.net / tietew@raug.net Web : http://www.tietew.net/ (Tietew Windows Lab.) PGP fingerprint: 26CB 71BB B595 09C4 0153 81C4 773C 963A D51B 8CAA