ruby-changes:47929
From: nobu <ko1@a...>
Date: Wed, 27 Sep 2017 14:27:11 +0900 (JST)
Subject: [ruby-changes:47929] nobu:r60043 (trunk): objspace_dump.c: remove unnecessary break
nobu 2017-09-27 14:27:06 +0900 (Wed, 27 Sep 2017) New Revision: 60043 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60043 Log: objspace_dump.c: remove unnecessary break Modified files: trunk/ext/objspace/objspace_dump.c Index: ext/objspace/objspace_dump.c =================================================================== --- ext/objspace/objspace_dump.c (revision 60042) +++ ext/objspace/objspace_dump.c (revision 60043) @@ -105,7 +105,7 @@ static inline const char * https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace_dump.c#L105 obj_type(VALUE obj) { switch (BUILTIN_TYPE(obj)) { -#define CASE_TYPE(type) case T_##type: return #type; break +#define CASE_TYPE(type) case T_##type: return #type CASE_TYPE(NONE); CASE_TYPE(NIL); CASE_TYPE(OBJECT); @@ -196,17 +196,17 @@ static const char * https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace_dump.c#L196 imemo_name(int imemo) { switch(imemo) { -#define TYPE_STR(t) case(imemo_##t): return #t; break; - TYPE_STR(env) - TYPE_STR(cref) - TYPE_STR(svar) - TYPE_STR(throw_data) - TYPE_STR(ifunc) - TYPE_STR(memo) - TYPE_STR(ment) - TYPE_STR(iseq) - default: - return "unknown"; +#define TYPE_STR(t) case(imemo_##t): return #t + TYPE_STR(env); + TYPE_STR(cref); + TYPE_STR(svar); + TYPE_STR(throw_data); + TYPE_STR(ifunc); + TYPE_STR(memo); + TYPE_STR(ment); + TYPE_STR(iseq); + default: + return "unknown"; #undef TYPE_STR } } @@ -241,8 +241,8 @@ dump_object(VALUE obj, struct dump_confi https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace_dump.c#L241 switch (BUILTIN_TYPE(obj)) { case T_NONE: - dump_append(dc, "}\n"); - return; + dump_append(dc, "}\n"); + return; case T_NODE: dump_append(dc, ", \"node_type\":\"%s\"", ruby_node_name(nd_type(obj))); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/