Consider a Rack app. I only want to handle the error if we are not running a test:
begin
do_something
if ENV[ 'RACK_ENV' ] != 'test'
rescue => error
handle_error error
end
end
end
This generates syntax error, unexpected keyword_rescue (SyntaxError)
rescue => error
Is there a way to do this?