summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-12 03:36:49 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-12 03:36:49 +0000
commitf7d72f1e6550af0571f15fb93327eb7c901fb104 (patch)
tree8c8b3ce8575b17c778a2ab67a2e893ac8af6d3b4 /gc.c
parente585523a2b60a69befc1562fd4c79cfa688bb197 (diff)
precedes registering global VALUE variables before initializing it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index d076898..c172a08 100644
--- a/gc.c
+++ b/gc.c
@@ -1053,7 +1053,9 @@ gc_sweep()
}
mark_source_filename(ruby_sourcefile);
- st_foreach(source_filenames, sweep_source_filename, 0);
+ if (source_filenames) {
+ st_foreach(source_filenames, sweep_source_filename, 0);
+ }
freelist = 0;
final_list = deferred_final_list;
@@ -1938,6 +1940,6 @@ Init_GC()
source_filenames = st_init_strtable();
- nomem_error = rb_exc_new2(rb_eNoMemError, "failed to allocate memory");
rb_global_variable(&nomem_error);
+ nomem_error = rb_exc_new2(rb_eNoMemError, "failed to allocate memory");
}