I’ve got a problem where if I execute a Ruby script that has a syntax
error or missing method and that correctly fails I cannot use that
engine object to subsequently execute a valid script. If I restart the
application and re-execute the corrected script it works. It’s only
executing an erroneous script and then a valid script that fails.
Does anyone know if there is anyway to re-initialise the Ruby engine
after a syntax or methodmissing exception so scripts can be executed
again without needing to restart the application?
Could you sent a full repro containing the source code of both scripts
and the order of execution?
Tomas
I thought I’d made a mistake for a while as I was having real difficulty
reapeating the problem. However I’ve found that it’s a particular type
of syntax error that causes the problem rather than any syntax error.
The end statement missing on an if block is the culprit. Below is the
code that illustrates the problem: