Exit from def?


#1

def bla

  for i in 1 .. 5
        puts i
        for j in 1 .. 5
                puts j
                if j==4
                    then
                        here i want to exit the "bla" def if j==4
                        somenthing like break, but break just

interrupt
the ‘j’ for not the entire procedure; how
can i do
that?
end

   end

end

tnx


#2

Bulhac M. wrote:

def bla

  for i in 1 .. 5
        puts i
        for j in 1 .. 5
                puts j
                if j==4
                    then
                        here i want to exit the "bla" def if j==4
                        somenthing like break, but break just

interrupt
the ‘j’ for not the entire procedure; how
can i do
that?
end

   end

end

tnx

for j in 1…5
puts j
return if j==4
end

best,
Dan