From: ts Date: 2000-11-15T15:01:16+09:00 Subject: [ruby-talk:6379] Re: rescue clause affecting IO loop behavior >>>>> "D" == Dave Thomas writes: D> def fred D> open("xsdsd", "r") D> rescue D> puts "Failed to open" D> ensure D> puts "Got here" D> end pigeon% ruby -rii dump def fred open("xsdsd", "r") rescue puts "Failed to open" ensure puts "Got here" end ^D eval_tree BLOCK NEWLINE <-:1> VCALL dump NEWLINE <-:2> DEFN fred SCOPE BLOCK ARGS ENSURE Execute RESCUE Execute NEWLINE <-:3> FCALL open ARRAY STR "xsdsd" STR "r" Rescue condition NEWLINE <-:5> FCALL puts ARRAY STR "Failed to open" End rescue Ensure NEWLINE <-:7> FCALL puts ARRAY STR "Got here" End ensure pigeon% Guy Decoux