aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--gc.c5
-rw-r--r--vm_insnhelper.c2
3 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ae14ca9412..ac21bfdafa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Mar 31 17:48:25 2016 Koichi Sasada <ko1@atdot.net>
+
+ * gc.c (gc_marks_finish): fix syntax error.
+
Thu Mar 31 16:49:36 2016 Koichi Sasada <ko1@atdot.net>
* gc.c: simplify allocate/free detecting logic at the end of marking.
diff --git a/gc.c b/gc.c
index 170964b957..ae77450a11 100644
--- a/gc.c
+++ b/gc.c
@@ -5383,8 +5383,8 @@ gc_marks_finish(rb_objspace_t *objspace)
/* check free_min */
if (min_free_slots < gc_params.heap_free_slots) min_free_slots = gc_params.heap_free_slots;
- if (sweep_slots < min_free_slots) {
#if USE_RGENGC
+ if (sweep_slots < min_free_slots) {
if (!full_marking) {
if (objspace->profile.count - objspace->rgengc.last_major_gc < RVALUE_OLD_AGE) {
full_marking = TRUE;
@@ -5426,11 +5426,12 @@ gc_marks_finish(rb_objspace_t *objspace)
objspace->rgengc.need_major_gc ? "major" : "minor");
#else /* USE_RGENGC */
+ if (sweep_slots < min_free_slots) {
gc_report(1, objspace, "gc_marks_finish: heap_set_increment!!\n");
heap_set_increment(objspace, heap_extend_pages(objspace, sweep_slot, total_slot));
heap_increment(objspace, heap);
-#endif
}
+#endif
}
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_END_MARK, 0);
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 39ca48a578..0176bb372e 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -663,7 +663,7 @@ vm_get_ev_const(rb_thread_t *th, VALUE orig_klass, ID id, int is_defined)
/* in current lexical scope */
const rb_cref_t *root_cref = rb_vm_get_cref(th->cfp->ep);
const rb_cref_t *cref;
- VALUE klass = orig_klass;
+ VALUE klass = Qnil;
while (root_cref && CREF_PUSHED_BY_EVAL(root_cref)) {
root_cref = CREF_NEXT(root_cref);