зеркало из https://github.com/github/ruby.git
revert re.c in r53736
* re.c (rb_reg_initialize): must copy the source string content, it is not a static literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
25fd278459
Коммит
09c9110896
|
@ -3,8 +3,6 @@ Thu Feb 4 15:35:29 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||
* string.c (rb_fstring_enc_new, rb_fstring_enc_cstr): functions to
|
||||
make fstring with encoding.
|
||||
|
||||
* re.c (rb_reg_initialize): make fstring without copying.
|
||||
|
||||
Thu Feb 4 14:42:29 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* common.mk: Added Unicode data file SpecialCasing.txt to be additionally
|
||||
|
|
2
re.c
2
re.c
|
@ -2580,7 +2580,7 @@ rb_reg_initialize(VALUE obj, const char *s, long len, rb_encoding *enc,
|
|||
options & ARG_REG_OPTION_MASK, err,
|
||||
sourcefile, sourceline);
|
||||
if (!re->ptr) return -1;
|
||||
RB_OBJ_WRITE(obj, &re->src, rb_fstring_enc_new(s, len, enc));
|
||||
RB_OBJ_WRITE(obj, &re->src, rb_fstring(rb_enc_str_new(s, len, enc)));
|
||||
RB_GC_GUARD(unescaped);
|
||||
return 0;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче