summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-16 18:34:57 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-16 18:34:57 +0000
commit13c2f278d8812fc960caf678f7041cbe7549ca3a (patch)
tree9f54a4a2ee16d0aa80e0f4ed738c010a35e01987 /eval.c
parent9464bf0584124d087aa62ff89b032918f52166bd (diff)
downloadruby-13c2f278d8812fc960caf678f7041cbe7549ca3a.tar.gz
ruby-13c2f278d8812fc960caf678f7041cbe7549ca3a.tar.xz
ruby-13c2f278d8812fc960caf678f7041cbe7549ca3a.zip
* eval.c (bmcall): fix a GC problem by tail call on
IA64 with gcc 4.0.3 20051216 (prerelease). git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9704 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 58971b128..d049b7ff6 100644
--- a/eval.c
+++ b/eval.c
@@ -9273,9 +9273,12 @@ bmcall(args, method)
VALUE args, method;
{
volatile VALUE a;
+ VALUE ret;
a = svalue_to_avalue(args);
- return method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
+ ret = method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
+ a = Qnil; /* prevent tail call */
+ return ret;
}
VALUE