summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--re.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index dd3ed27010..14a0ff520f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Sep 16 21:48:55 2008 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * re.c (rb_reg_desc): Regexp#inspect should be US-ASCII.
+
Tue Sep 16 21:33:22 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (rb_str_crypt): orthodox crypt() sees only first two bytes
diff --git a/re.c b/re.c
index b47ec108e6..b9d3840313 100644
--- a/re.c
+++ b/re.c
@@ -381,7 +381,7 @@ rb_reg_desc(const char *s, long len, VALUE re)
{
VALUE str = rb_str_buf_new2("/");
- rb_enc_copy(str, re);
+ rb_enc_associate(str, rb_usascii_encoding());
rb_reg_expr_str(str, s, len);
rb_str_buf_cat2(str, "/");
if (re) {