summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-08 18:21:56 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-08 18:21:56 +0000
commit5a797c1c770365c40c4680c13bf0dd6d15bdc989 (patch)
tree436816d2944706e2b1618db628d8ef4db1558961
parenta68e4c748c111ae947a571a4ab149ef77c85667e (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--ChangeLog4
-rw-r--r--gc.c6
-rw-r--r--version.h2
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 <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.
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