diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-26 07:43:16 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-26 07:43:16 +0000 |
| commit | 360e6e5e121891088da04ebc297e8a611f14d16f (patch) | |
| tree | c930ba9b062b93dcff599da724d47fddab6198d6 | |
| parent | 9d86628e47394e2f2d53e62782222721491c8d7e (diff) | |
| download | ruby-360e6e5e121891088da04ebc297e8a611f14d16f.tar.gz ruby-360e6e5e121891088da04ebc297e8a611f14d16f.tar.xz ruby-360e6e5e121891088da04ebc297e8a611f14d16f.zip | |
* string.c (rb_str_scan): add string modification check.
[ruby-core:7216]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | string.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Wed Jul 26 16:39:07 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * string.c (rb_str_scan): add string modification check. + [ruby-core:7216] + Wed Jul 26 16:06:03 2006 Yukihiro Matsumoto <matz@ruby-lang.org> * lib/cgi.rb (CGI::QueryExtension::read_multipart): check @@ -4255,6 +4255,7 @@ rb_str_scan(str, pat) VALUE result; long start = 0; VALUE match = Qnil; + char *p = RSTRING(str)->ptr; long len = RSTRING(str)->len; pat = get_pat(pat, 1); if (!rb_block_given_p()) { @@ -4272,6 +4273,7 @@ rb_str_scan(str, pat) match = rb_backref_get(); rb_match_busy(match); rb_yield(result); + str_mod_check(str, p, len); rb_backref_set(match); /* restore $~ value */ } rb_backref_set(match); |
