summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index 8aa20ce11e..dfaa2e1c9c 100644
--- a/ruby.c
+++ b/ruby.c
@@ -856,7 +856,10 @@ load_file(fname, script)
else if (f != rb_stdin) {
rb_io_close(f);
}
- rb_gc();
+
+ if (ruby_parser_stack_on_heap()) {
+ rb_gc();
+ }
}
void