mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add placeholder to let braces match
This commit is contained in:
parent
56cc3e99b6
commit
048f14221c
1 changed files with 6 additions and 6 deletions
12
string.c
12
string.c
|
@ -299,7 +299,8 @@ rb_str_make_independent(VALUE str)
|
|||
}
|
||||
|
||||
void
|
||||
rb_str_make_embedded(VALUE str) {
|
||||
rb_str_make_embedded(VALUE str)
|
||||
{
|
||||
RUBY_ASSERT(rb_str_reembeddable_p(str));
|
||||
RUBY_ASSERT(!STR_EMBED_P(str));
|
||||
|
||||
|
@ -1806,15 +1807,14 @@ str_duplicate_setup(VALUE klass, VALUE str, VALUE dup)
|
|||
}
|
||||
assert(!STR_SHARED_P(root));
|
||||
assert(RB_OBJ_FROZEN_RAW(root));
|
||||
#if USE_RVARGC
|
||||
if (1) {
|
||||
#else
|
||||
if (STR_EMBED_P(root)) {
|
||||
if (0) {}
|
||||
#if !USE_RVARGC
|
||||
else if (STR_EMBED_P(root)) {
|
||||
MEMCPY(RSTRING(dup)->as.embed.ary, RSTRING(root)->as.embed.ary,
|
||||
char, RSTRING_EMBED_LEN_MAX + 1);
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
else {
|
||||
RSTRING(dup)->as.heap.len = RSTRING_LEN(str);
|
||||
RSTRING(dup)->as.heap.ptr = RSTRING_PTR(str);
|
||||
RB_OBJ_WRITE(dup, &RSTRING(dup)->as.heap.aux.shared, root);
|
||||
|
|
Loading…
Add table
Reference in a new issue