diff --git a/lib/natalie/compiler/instructions/try_instruction.rb b/lib/natalie/compiler/instructions/try_instruction.rb index 74949451e..aec4cb266 100644 --- a/lib/natalie/compiler/instructions/try_instruction.rb +++ b/lib/natalie/compiler/instructions/try_instruction.rb @@ -55,10 +55,7 @@ def generate(transform) code << t.transform(@discard_catch_result ? nil : "#{result} =") end - # FIXME: can't we just call set_exception without the clear_exception() call? - code << 'if (exception_was) env->set_exception(exception_was)' - code << 'else env->clear_exception()' - + code << 'env->set_exception(exception_was)' code << 'GlobalEnv::the()->set_rescued(true)' code << '}'