summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-13 04:15:51 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-13 04:15:51 +0000
commit1454c9812becc4d64bb319cb76a2563c69a2ec5e (patch)
tree15cbc5598eff26f869964a164761ae822e3935d9 /gc.c
parent465eec7158652dea2823f919eb3f4b0ed01e9ff3 (diff)
merge revision(s) 15429, 15471:
* gc.c (rb_newobj): prohibit call of rb_newobj() during gc. Submitted by Sylvain Joyeux [ruby-core:12099]. * ext/dl/ptr.c: do not use LONG2NUM() inside dlptr_free(). Slightly modified fix bassed on a patch by Sylvain Joyeux [ruby-core:12099] [ ruby-bugs-11859 ] [ ruby-bugs-11882 ] [ ruby-patches-13151 ]. * ext/dl/ptr.c (dlmem_each_i): typo fixed. a patch from IKOMA Yoshiki <ikoma@mb.i-chubu.ne.jp> in [ruby-dev:33776]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index a04804902a..bc3ef5a893 100644
--- a/gc.c
+++ b/gc.c
@@ -378,6 +378,9 @@ rb_newobj()
{
VALUE obj;
+ if (during_gc)
+ rb_bug("object allocation during garbage collection phase");
+
if (!freelist) garbage_collect();
obj = (VALUE)freelist;