summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-14 00:06:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-14 00:06:42 +0000
commite53e556bd5a772ef938963d70a9f2a57f4e2969b (patch)
treea149ffef71c9d20d6eff4b71759a5925894dd8e5 /eval.c
parent72838c28bd2690693f0e326eee595d54aba6459c (diff)
* eval.c (ruby_run_node): need to call ruby_cleaup() always even
if any error occurred so far. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 ff85fbfc99..943b2189a1 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));
}