mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
Mark list as frozen and shareable
This commit is contained in:
parent
e44bec9b92
commit
7c51ce5ff6
@ -152,6 +152,8 @@ enc_list_update(int index, rb_raw_encoding *encoding)
|
||||
RBASIC_CLEAR_CLASS(new_list);
|
||||
/* initialize encoding data */
|
||||
rb_ary_store(new_list, index, enc_new(encoding));
|
||||
rb_ary_freeze(new_list);
|
||||
FL_SET_RAW(new_list, RUBY_FL_SHAREABLE);
|
||||
RUBY_ATOMIC_VALUE_SET(rb_encoding_list, new_list);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user