From e53e556bd5a772ef938963d70a9f2a57f4e2969b Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 14 Oct 2009 00:06:42 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ eval.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 01e99271de..0b5a068df3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Oct 14 09:06:38 2009 Nobuyoshi Nakada + + * eval.c (ruby_run_node): need to call ruby_cleaup() always even + if any error occurred so far. + Wed Oct 14 08:08:12 2009 Marc-Andre Lafortune * proc.c (mnew): Method#new checks for respond_to_missing? with 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)); }