From 5a797c1c770365c40c4680c13bf0dd6d15bdc989 Mon Sep 17 00:00:00 2001 From: knu Date: Sun, 8 Jun 2008 18:21:56 +0000 Subject: * gc.c (os_obj_of): assure to not free the scanning heap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ gc.c | 6 ++++-- version.h | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b016d0ace..5529e43c88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Jun 9 03:21:20 2008 Tanaka Akira + + * gc.c (os_obj_of): assure to not free the scanning heap. + Mon Jun 9 03:20:12 2008 NAKAMURA Usaku * io.c (rb_open_file, rb_io_s_sysopen): fmode should be unsigned int. diff --git a/gc.c b/gc.c index 1ff9cadba2..6199939ab6 100644 --- a/gc.c +++ b/gc.c @@ -1644,6 +1644,7 @@ os_obj_of(of) { int i; int n = 0; + volatile VALUE v; for (i = 0; i < heaps_used; i++) { RVALUE *p, *pend; @@ -1662,8 +1663,9 @@ os_obj_of(of) if (FL_TEST(p, FL_SINGLETON)) continue; default: if (!p->as.basic.klass) continue; - if (!of || rb_obj_is_kind_of((VALUE)p, of)) { - rb_yield((VALUE)p); + v = (VALUE)p; + if (!of || rb_obj_is_kind_of(v, of)) { + rb_yield(v); n++; } } diff --git a/version.h b/version.h index eb452d8d30..3fdd32703e 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2008-06-09" #define RUBY_VERSION_CODE 187 #define RUBY_RELEASE_CODE 20080609 -#define RUBY_PATCHLEVEL 11 +#define RUBY_PATCHLEVEL 12 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 -- cgit v1.2.3