diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-08 18:21:56 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-08 18:21:56 +0000 |
commit | 5a797c1c770365c40c4680c13bf0dd6d15bdc989 (patch) | |
tree | 436816d2944706e2b1618db628d8ef4db1558961 | |
parent | a68e4c748c111ae947a571a4ab149ef77c85667e (diff) |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 6 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Mon Jun 9 03:21:20 2008 Tanaka Akira <akr@fsij.org> + + * gc.c (os_obj_of): assure to not free the scanning heap. + Mon Jun 9 03:20:12 2008 NAKAMURA Usaku <usa@ruby-lang.org> * io.c (rb_open_file, rb_io_s_sysopen): fmode should be unsigned int. @@ -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++; } } @@ -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 |