1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c (os_live_obj): fix to skip T_VALUES.

* sample/test.rb: add an ObjectSpace test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2007-08-15 09:58:59 +00:00
parent 0aecfb0439
commit f13e9b734c
3 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Wed Aug 15 18:57:30 2007 Koichi Sasada <ko1@atdot.net>
* gc.c (os_live_obj): fix to skip T_VALUES.
* sample/test.rb: add an ObjectSpace test.
Wed Aug 15 16:49:04 2007 Koichi Sasada <ko1@atdot.net> Wed Aug 15 16:49:04 2007 Koichi Sasada <ko1@atdot.net>
* inits.c (rb_call_inits): change initializing order. * inits.c (rb_call_inits): change initializing order.

1
gc.c
View file

@ -1698,6 +1698,7 @@ os_live_obj(void)
switch (TYPE(p)) { switch (TYPE(p)) {
case T_ICLASS: case T_ICLASS:
case T_NODE: case T_NODE:
case T_VALUES:
continue; continue;
case T_CLASS: case T_CLASS:
if (FL_TEST(p, FL_SINGLETON)) continue; if (FL_TEST(p, FL_SINGLETON)) continue;

View file

@ -2215,6 +2215,11 @@ l = []
GC.start GC.start
test_ok true # reach here or dumps core test_ok true # reach here or dumps core
ObjectSpace.each_object{|o|
o.class.name
}
test_ok true # reach here or dumps core
if $failed > 0 if $failed > 0
printf "not ok/test: %d failed %d\n", $ntest, $failed printf "not ok/test: %d failed %d\n", $ntest, $failed
else else