From 0dc7839b7f6176de843126466a97fc24a034398e Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 12 Jul 2009 15:04:33 +0000 Subject: [PATCH] ENV is now locale encoding. * hash.c (env_str_new): use rb_locale_str_new instead of rb_tainted_str_new. rb_locale_str_new set string locale encoding and tainted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 +++++++- hash.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95034d13da..f7d709c60e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Jul 12 23:51:39 2009 NARUSE, Yui + + * hash.c (env_str_new): use rb_locale_str_new instead of + rb_tainted_str_new. rb_locale_str_new set string locale + encoding and tainted. + Sun Jul 12 23:56:40 2009 Tadayoshi Funaba * complex.c: added some shortcuts. @@ -41,7 +47,7 @@ Sat Jul 11 07:11:59 2009 Nobuyoshi Nakada Sat Jul 11 02:37:37 2009 Nobuyoshi Nakada - * random.c (limited_rand): expands to long before shift so tha + * random.c (limited_rand): expands to long before shift so that the result does not overflow. Sat Jul 11 00:16:27 2009 Nobuyoshi Nakada diff --git a/hash.c b/hash.c index 6579a1eac2..c65d24263e 100644 --- a/hash.c +++ b/hash.c @@ -1857,7 +1857,7 @@ extern char **environ; static VALUE env_str_new(const char *ptr, long len) { - VALUE str = rb_tainted_str_new(ptr, len); + VALUE str = rb_locale_str_new(ptr, len); rb_obj_freeze(str); return str;