From: matz@... (Yukihiro Matsumoto) Date: 2001-10-22T06:33:48+09:00 Subject: [ruby-talk:22899] Re: Possible RCR? - break for nested loops Hi, In message "[ruby-talk:22893] Possible RCR? - break for nested loops" on 01/10/22, Wayne Vucenic writes: |A month or two ago on this mailing list there was a discussion of the |best way to break out of nested loops. I think a minor change to Ruby |would allow an elegant way to do this. As I stated in the Ruby Conference, official answer for this request is: use catch and throw. Like the following. catch (:matched) do for i in 0..5 for j in 5..8 if i == j throw :matched end end end end if i == j print "match\n" else print "nomatch\n" end matz.