diff --git a/hash.c b/hash.c index 0f0ea43144..6f3ffb78ba 100644 --- a/hash.c +++ b/hash.c @@ -3608,24 +3608,24 @@ symbol_key_needs_quote(VALUE str) if (first == '@' || first == '$' || first == '!') return true; if (!at_char_boundary(s, s + len - 1, RSTRING_END(str), rb_enc_get(str))) return false; switch (s[len - 1]) { - case '+': - case '-': - case '*': - case '/': - case '`': - case '%': - case '^': - case '&': - case '|': - case ']': - case '<': - case '=': - case '>': - case '~': - case '@': - return true; - default: - return false; + case '+': + case '-': + case '*': + case '/': + case '`': + case '%': + case '^': + case '&': + case '|': + case ']': + case '<': + case '=': + case '>': + case '~': + case '@': + return true; + default: + return false; } } diff --git a/namespace.c b/namespace.c index dd7d21c380..e667590890 100644 --- a/namespace.c +++ b/namespace.c @@ -596,15 +596,15 @@ static const char * copy_ext_file_error(char *message, size_t size, int copy_retvalue, char *src_path, char *dst_path) { switch (copy_retvalue) { - case 1: + case 1: snprintf(message, size, "can't open the extension path: %s", src_path); - case 2: + case 2: snprintf(message, size, "can't open the file to write: %s", dst_path); - case 3: + case 3: snprintf(message, size, "failed to read the extension path: %s", src_path); - case 4: + case 4: snprintf(message, size, "failed to write the extension path: %s", dst_path); - default: + default: rb_bug("unknown return value of copy_ext_file: %d", copy_retvalue); } return message; diff --git a/object.c b/object.c index 0ab93b7a71..4d54b73740 100644 --- a/object.c +++ b/object.c @@ -377,19 +377,19 @@ init_copy(VALUE dest, VALUE obj) // Copies the shape id from obj to dest RBASIC(dest)->flags |= RBASIC(obj)->flags & T_MASK; switch (BUILTIN_TYPE(obj)) { - case T_IMEMO: - rb_bug("Unreachable"); - break; - case T_CLASS: - case T_MODULE: - // noop: handled in class.c: rb_mod_init_copy - break; - case T_OBJECT: - rb_obj_copy_ivar(dest, obj); - break; - default: - rb_copy_generic_ivar(dest, obj); - break; + case T_IMEMO: + rb_bug("Unreachable"); + break; + case T_CLASS: + case T_MODULE: + // noop: handled in class.c: rb_mod_init_copy + break; + case T_OBJECT: + rb_obj_copy_ivar(dest, obj); + break; + default: + rb_copy_generic_ivar(dest, obj); + break; } rb_gc_copy_attributes(dest, obj); }