diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-16 13:16:12 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-16 13:16:12 +0000 |
commit | 025bd642a738fdd6a0376836725835716dfd4738 (patch) | |
tree | 598969bbfdfae31ad0ef2cabe377c51923fee898 | |
parent | 507658bd54e638a02df562be38dd9dbdf17082f2 (diff) | |
download | ruby-025bd642a738fdd6a0376836725835716dfd4738.tar.gz |
* re.c (rb_reg_desc): Regexp#inspect should be US-ASCII.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | re.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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 @@ -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) { |