diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-22 04:27:32 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-22 04:27:32 +0000 |
| commit | c83363c93e4debd9dc5d5fd94a6a91bb5bdad666 (patch) | |
| tree | dbe89708394d548a480ffe31af2a552a23887d62 | |
| parent | 72cb863cf1350af4bac5a9b5950280dca9745f43 (diff) | |
| download | ruby-c83363c93e4debd9dc5d5fd94a6a91bb5bdad666.tar.gz ruby-c83363c93e4debd9dc5d5fd94a6a91bb5bdad666.tar.xz ruby-c83363c93e4debd9dc5d5fd94a6a91bb5bdad666.zip | |
* re.c (unescape_escaped_nonascii): back out the last change on
the function. [ruby-dev:36818]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | re.c | 8 |
2 files changed, 7 insertions, 6 deletions
@@ -1,3 +1,8 @@ +Wed Oct 22 13:16:47 2008 Yukihiro Matsumoto <matz@ruby-lang.org> + + * re.c (unescape_escaped_nonascii): back out the last change on + the function. [ruby-dev:36818] + Wed Oct 22 07:09:19 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * ext/zlib/zlib.c (rb_gzreader_ungetc): should be able to unget @@ -1967,12 +1967,8 @@ unescape_escaped_nonascii(const char **pp, const char *end, rb_encoding *enc, l = rb_enc_precise_mbclen(chbuf, chbuf+chlen, enc); if (MBCLEN_INVALID_P(l)) { - if (*encp == 0) - enc = *encp = rb_ascii8bit_encoding(); - else if (*encp != rb_ascii8bit_encoding()) { - strcpy(err, "invalid multibyte escape"); - return -1; - } + strcpy(err, "invalid multibyte escape"); + return -1; } if (1 < chlen || (chbuf[0] & 0x80)) { rb_str_buf_cat(buf, chbuf, chlen); |
