[前][次][番号順一覧][スレッド一覧]

ruby-changes:33480

From: nobu <ko1@a...>
Date: Fri, 11 Apr 2014 10:31:12 +0900 (JST)
Subject: [ruby-changes:33480] nobu:r45560 (trunk): gc.c: no newline to rb_bug

nobu	2014-04-11 10:31:06 +0900 (Fri, 11 Apr 2014)

  New Revision: 45560

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45560

  Log:
    gc.c: no newline to rb_bug
    
    * gc.c: no newline in messages for rb_bug, it outputs a newline
      after the message.

  Modified files:
    trunk/gc.c
Index: gc.c
===================================================================
--- gc.c	(revision 45559)
+++ gc.c	(revision 45560)
@@ -1357,8 +1357,8 @@ newobj_of(VALUE klass, VALUE flags, VALU https://github.com/ruby/ruby/blob/trunk/gc.c#L1357
     rgengc_report(5, objspace, "newobj: %p (%s)\n", (void *)obj, obj_type_name(obj));
 
 #if USE_RGENGC && RGENGC_CHECK_MODE
-    if (RVALUE_PROMOTED_P(obj)) rb_bug("newobj: %p (%s) is promoted.\n", (void *)obj, obj_type_name(obj));
-    if (rgengc_remembered(objspace, (VALUE)obj)) rb_bug("newobj: %p (%s) is remembered.\n", (void *)obj, obj_type_name(obj));
+    if (RVALUE_PROMOTED_P(obj)) rb_bug("newobj: %p (%s) is promoted.", (void *)obj, obj_type_name(obj));
+    if (rgengc_remembered(objspace, (VALUE)obj)) rb_bug("newobj: %p (%s) is remembered.", (void *)obj, obj_type_name(obj));
 #endif
 
     objspace->profile.total_allocated_object_num++;
@@ -2771,8 +2771,8 @@ gc_page_sweep(rb_objspace_t *objspace, r https://github.com/ruby/ruby/blob/trunk/gc.c#L2771
 		    if (p->as.basic.flags) {
 			rgengc_report(3, objspace, "page_sweep: free %p (%s)\n", p, obj_type_name((VALUE)p));
 #if USE_RGENGC && RGENGC_CHECK_MODE
-			if (objspace->rgengc.during_minor_gc && RVALUE_OLD_P((VALUE)p)) rb_bug("page_sweep: %p (%s) is old while minor GC.\n", p, obj_type_name((VALUE)p));
-			if (rgengc_remembered(objspace, (VALUE)p)) rb_bug("page_sweep: %p (%s) is remembered.\n", p, obj_type_name((VALUE)p));
+			if (objspace->rgengc.during_minor_gc && RVALUE_OLD_P((VALUE)p)) rb_bug("page_sweep: %p (%s) is old while minor GC.", p, obj_type_name((VALUE)p));
+			if (rgengc_remembered(objspace, (VALUE)p)) rb_bug("page_sweep: %p (%s) is remembered.", p, obj_type_name((VALUE)p));
 #endif
 			if (obj_free(objspace, (VALUE)p)) {
 			    final_slots++;
@@ -4526,7 +4526,7 @@ gc_verify_internal_consistency(VALUE sel https://github.com/ruby/ruby/blob/trunk/gc.c#L4526
 	gc_marks_check(objspace, NULL, NULL);
 	allrefs_dump(objspace);
 #endif
-	rb_bug("gc_verify_internal_consistency: found internal consistency.\n");
+	rb_bug("gc_verify_internal_consistency: found internal consistency.");
     }
 #endif
     return Qnil;
@@ -4652,7 +4652,7 @@ rgengc_remember(rb_objspace_t *objspace, https://github.com/ruby/ruby/blob/trunk/gc.c#L4652
 	switch (BUILTIN_TYPE(obj)) {
 	  case T_NONE:
 	  case T_ZOMBIE:
-	    rb_bug("rgengc_remember: should not remember %p (%s)\n",
+	    rb_bug("rgengc_remember: should not remember %p (%s)",
 		   (void *)obj, obj_type_name(obj));
 	  default:
 	    ;
@@ -4782,7 +4782,7 @@ void https://github.com/ruby/ruby/blob/trunk/gc.c#L4782
 rb_gc_writebarrier(VALUE a, VALUE b)
 {
     if (RGENGC_CHECK_MODE) {
-	if (!RVALUE_PROMOTED_P(a)) rb_bug("rb_gc_writebarrier: referer object %p (%s) is not promoted.\n", (void *)a, obj_type_name(a));
+	if (!RVALUE_PROMOTED_P(a)) rb_bug("rb_gc_writebarrier: referer object %p (%s) is not promoted.", (void *)a, obj_type_name(a));
     }
 
     if (!RVALUE_OLD_P(b) && RVALUE_OLD_BITMAP_P(a)) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]