summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-13 04:12:35 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-13 04:12:35 +0000
commit432ec4f2c4fdae76c2ff161b15eabe84f5b27e6a (patch)
tree5dd97b417ef31282a500d8435638a6b219f5b069 /gc.c
parent32ddfd300d0e2720f1c77e152dae9157d46812be (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_5@17138 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 996713ef19..00d55666a3 100644
--- a/gc.c
+++ b/gc.c
@@ -392,6 +392,9 @@ rb_newobj()
{
VALUE obj;
+ if (during_gc)
+ rb_bug("object allocation during garbage collection phase");
+
if (!freelist) garbage_collect();
obj = (VALUE)freelist;