From: Sameera Gayan Date: 2008-01-30T22:44:39+09:00 Subject: Start and stop a ruby loop ;( Hi all, I have the following loop class myFirstClass is_loop = 0 def start_my_loop for is_loop < 1 puts 'Im inside the loop..............' end end end i can start above class's loop by using following... require 'myFirstClass' class mySecondClass oFirst = myFirstClass.new oFirst.start_my_loop end and i need a way to stop the above loop from calling another method. Like... calling a nother method to make the 'is_loop' to 1 but the problem is when i use the myFirstClass.new --> is_loop to 0 so can anyone tell me a way to do this. I want to start the loop from one method and stop it from another. (Or what is the way to do this) I'm sorry if i'm doing something wrong coz i'm nwe to ruby thankx in advance cheers sameera -- Posted via http://www.ruby-forum.com/.