From: Robert Klemme Date: 2012-08-10T16:12:30+09:00 Subject: Re: Time-efficient program On Thu, Aug 9, 2012 at 11:26 PM, ajay paswan wrote: >> Then profile (you can do it using ruby-prof gem.) > In the end of the program, the program never halts, I have no clue where > it is lopping, how can i know that? i mean the code block where it is > looping or getting stuck? You could do poor man's tracing. Add this at the top: set_trace_func lambda {|*a| $stderr.puts a.inspect} and then invoke $ your_program 2>trace.log Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/