diff --git a/gc.c b/gc.c index f0de80ca71..fba751b24c 100644 --- a/gc.c +++ b/gc.c @@ -11851,6 +11851,7 @@ Init_GC(void) rb_mGC = rb_define_module("GC"); gc_constants = rb_hash_new(); + rb_hash_aset(gc_constants, ID2SYM(rb_intern("DEBUG")), GC_DEBUG ? Qtrue : Qfalse); rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVALUE_SIZE")), SIZET2NUM(sizeof(RVALUE))); rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_OBJ_LIMIT")), SIZET2NUM(HEAP_PAGE_OBJ_LIMIT)); rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_BITMAP_SIZE")), SIZET2NUM(HEAP_PAGE_BITMAP_SIZE)); diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 0ff09f3fcb..785376f09c 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -1256,6 +1256,7 @@ class TestTime < Test::Unit::TestCase def test_memsize # Time objects are common in some code, try to keep them small skip "Time object size test" if /^(?:i.?86|x86_64)-linux/ !~ RUBY_PLATFORM + skip "GC is in debug" if GC::INTERNAL_CONSTANTS[:DEBUG] require 'objspace' t = Time.at(0) size = GC::INTERNAL_CONSTANTS[:RVALUE_SIZE]