From: Heesob Park Date: 2010-07-22T16:21:52+09:00 Subject: [ruby-core:31435] [Bug #3599] Incorrect Regexp inspect for ASCII-8BIT String Issue #3599 has been updated by Heesob Park. Here is a simple patch for this bug. --- re.c 2010-07-22 16:12:01.536788151 +0900 +++ re.c.new 2010-07-22 16:13:15.229038356 +0900 @@ -373,7 +373,8 @@ int l; if (resenc) { unsigned int c = rb_enc_mbc_to_codepoint(p, pend, enc); - l = rb_str_buf_cat_escaped_char(str, c, unicode_p); + rb_str_buf_cat_escaped_char(str, c, unicode_p); + l = clen; } else { l = mbclen(p, pend, enc); ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3599 ---------------------------------------- http://redmine.ruby-lang.org