summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index ff85fbfc9..943b2189a 100644
--- a/eval.c
+++ b/eval.c
@@ -236,7 +236,10 @@ int
ruby_run_node(void *n)
{
int status;
- if (!ruby_executable_node(n, &status)) return status;
+ if (!ruby_executable_node(n, &status)) {
+ ruby_cleanup(0);
+ return status;
+ }
return ruby_cleanup(ruby_exec_node(n));
}