Dear Colleagues
I am a newie in Ruby and I am facing a problem regarding "each"-like loops. Suppose a code like the following
startIndex = 1
endIndex = 200
(startIndex..endIndex).each do |value|
p value
if value>150 then endIndex=100
end
When I run the code it will run until 200, not until 150. Is there any way to change the limits of the loop range dynamically in Ruby?
Thanks in advance for your help
Tryskele