summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--re.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d4dd45f09..b5e669d285 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/re.c b/re.c
index bd598ddf66..465e12c8c2 100644
--- a/re.c
+++ b/re.c
@@ -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);