зеркало из https://github.com/github/ruby.git
string.c: mark frozen string
* string.c (rb_fstring): because of lazy sweep, str may be unmaked already and swept at next time, so mark it for the time being. [ruby-core:57756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b1b4724ea0
Коммит
a28de81aec
|
@ -1,3 +1,9 @@
|
|||
Wed Oct 9 17:40:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* string.c (rb_fstring): because of lazy sweep, str may be unmaked
|
||||
already and swept at next time, so mark it for the time being.
|
||||
[ruby-core:57756]
|
||||
|
||||
Wed Oct 9 13:53:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* compar.c (cmp_eq): fail if recursion. [ruby-core:57736] [Bug #9003]
|
||||
|
|
3
string.c
3
string.c
|
@ -146,6 +146,9 @@ rb_fstring(VALUE str)
|
|||
st_data_t fstr;
|
||||
if (st_lookup(frozen_strings, (st_data_t)str, &fstr)) {
|
||||
str = (VALUE)fstr;
|
||||
/* because of lazy sweep, str may be unmaked already and swept
|
||||
* at next time */
|
||||
rb_gc_mark(str);
|
||||
}
|
||||
else {
|
||||
str = rb_str_new_frozen(str);
|
||||
|
|
Загрузка…
Ссылка в новой задаче