1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* string.c (rb_str_subpat_set): must make str independent after

rb_reg_search() matched.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2002-03-14 00:10:49 +00:00
parent f963fa6956
commit bce7601f73
2 changed files with 6 additions and 0 deletions

View file

@ -2,6 +2,11 @@ Thu Mar 14 08:57:41 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* dir.c (rb_push_glob): avoid SEGV when a block given.
Thu Mar 14 00:16:02 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* string.c (rb_str_subpat_set): must make str independent after
rb_reg_search() matched.
Wed Mar 13 19:05:15 2002 Akinori MUSHA <knu@iDaemons.org>
* dir.c: FNM_PERIOD is obsoleted and FNM_DOTMATCH is introduced

View file

@ -1252,6 +1252,7 @@ rb_str_subpat_set(str, re, nth, val)
}
end = RMATCH(match)->END(nth);
len = end - start;
rb_str_modify(str);
rb_str_update(str, start, len, val);
}