mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Adjust indents [ci skip]
This commit is contained in:
parent
fb6f255028
commit
abafb662ea
3 changed files with 36 additions and 36 deletions
36
hash.c
36
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
10
namespace.c
10
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;
|
||||
|
|
26
object.c
26
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue