ruby-changes:51068
From: nobu <ko1@a...>
Date: Fri, 27 Apr 2018 22:14:15 +0900 (JST)
Subject: [ruby-changes:51068] nobu:r63275 (trunk): iseq.c: consistent rb_bug messages
nobu 2018-04-27 22:14:09 +0900 (Fri, 27 Apr 2018) New Revision: 63275 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63275 Log: iseq.c: consistent rb_bug messages Modified files: trunk/iseq.c Index: iseq.c =================================================================== --- iseq.c (revision 63274) +++ iseq.c (revision 63275) @@ -1800,7 +1800,7 @@ rb_insn_operand_intern(const rb_iseq_t * https://github.com/ruby/ruby/blob/trunk/iseq.c#L1800 break; default: - rb_bug("insn_operand_intern: unknown operand type: %c", type); + rb_bug("unknown operand type: %c", type); } return ret; } @@ -1903,7 +1903,7 @@ catch_type(int type) https://github.com/ruby/ruby/blob/trunk/iseq.c#L1903 case CATCH_TYPE_NEXT: return "next"; default: - rb_bug("unknown catch type (%d)", type); + rb_bug("unknown catch type: %d", type); return 0; } } @@ -2310,7 +2310,7 @@ ruby_node_name(int node) https://github.com/ruby/ruby/blob/trunk/iseq.c#L2310 switch (node) { #include "node_name.inc" default: - rb_bug("unknown node (%d)", node); + rb_bug("unknown node: %d", node); return 0; } } @@ -2341,7 +2341,7 @@ exception_type2symbol(VALUE type) https://github.com/ruby/ruby/blob/trunk/iseq.c#L2341 case CATCH_TYPE_REDO: CONST_ID(id, "redo"); break; case CATCH_TYPE_NEXT: CONST_ID(id, "next"); break; default: - rb_bug("exception_type2symbol: unknown type %d", (int)type); + rb_bug("unknown exception type: %d", (int)type); } return ID2SYM(id); } @@ -2413,7 +2413,7 @@ iseq_data_to_ary(const rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/iseq.c#L2413 case ISEQ_TYPE_EVAL: type = sym_eval; break; case ISEQ_TYPE_MAIN: type = sym_main; break; case ISEQ_TYPE_PLAIN: type = sym_plain; break; - default: rb_bug("unsupported iseq type"); + default: rb_bug("unsupported iseq type: %d", (int)iseq->body->type); }; /* locals */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/