diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-30 08:43:28 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-30 08:43:28 +0000 |
commit | 20d323310053fd443ec3bac68515232d391b98a8 (patch) | |
tree | 04fc0c8f6e436dbe5025298e3d61851252820e27 /regex.c | |
parent | 9033177cf4b87e1f0d5a4faddfa116e05d818a7a (diff) | |
download | ruby-20d323310053fd443ec3bac68515232d391b98a8.tar.gz ruby-20d323310053fd443ec3bac68515232d391b98a8.tar.xz ruby-20d323310053fd443ec3bac68515232d391b98a8.zip |
* string.c (rb_str_chomp_bang): do smart chomp if $/ == '\n'.
* io.c (rb_io_puts): don't treat Array specially.
* bignum.c (rb_big_cmp): should convert bignum to float.
* eval.c (rb_f_eval): can't modify untainted binding.
* regex.c (re_compile_pattern): should preverve p0 value.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r-- | regex.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1540,11 +1540,15 @@ re_compile_pattern(pattern, size, bufp) case 'M': case 'C': case 'c': - p0 = --p; - c = read_special(p, pend, &p0); - if (c > 255) goto invalid_escape; - p = p0; - had_num_literal = 1; + { + char *pp; + + --p; + c = read_special(p, pend, &pp); + if (c > 255) goto invalid_escape; + p = pp; + had_num_literal = 1; + } break; default: |