From: Robert Klemme Date: 2004-06-30T15:42:54+09:00 Subject: Re: Eval Lockup "stevetuckner" schrieb im Newsbeitrag news:40E1D350.8060804@usfamily.net... > Hello all, > > I am currently modifying Instiki to allow code to be put on wiki pages > between <% %> tags. It seems to work fine, but now I have run into an > issue that I am not sure what to do about. With particular Wiki > contents, if the eval causes an exception, the exception object that is > caught is broken somehow. When it do e.message, ruby locks up by going > into some infiniite loop and sucks all my computer's resources down with > it (it is worse on Linux than on Windows). I have tried it with the > latest CVS version of ruby and it still occurs. Does any one have any > ideas on how to debug this problem. If anyone is interested in trying > it, I can send them a tar of the instiki directory with my data and code > mods. Maybe you get into an infinite loop. Tracing via #set_trace_func could help. You can put something like this into a module that you require: $trace = File.open("/c/temp/ruby/trace.log", "w") $trace.sync = true set_trace_func proc {|*args| if /(call|return)$/ =~ args[0] $trace.puts args.inspect end } Note: performance will be awful.... :-) robert