summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-31 03:18:30 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-31 03:18:30 +0000
commit1ff0d08b200abd769978038e84afe656934ef361 (patch)
tree04713cba6da6985401a20565ee3f1be58ff30ba1 /time.c
parent60d976b3ddbbb77f378c34f6633efb2cf4331d15 (diff)
merges r29851 from trunk into ruby_1_9_2.
-- * time.c (time_zone): use rb_locale_str_new_cstr to set encoding as locale and convert its content to internal encoding. [ruby-core:33278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/time.c b/time.c
index 2e53170151..463bf6e609 100644
--- a/time.c
+++ b/time.c
@@ -4151,11 +4151,11 @@ time_zone(VALUE time)
MAKE_TM(time, tobj);
if (TIME_UTC_P(tobj)) {
- return rb_str_new2("UTC");
+ return rb_obj_untaint(rb_locale_str_new_cstr("UTC"));
}
if (tobj->vtm.zone == NULL)
return Qnil;
- return rb_str_new2(tobj->vtm.zone);
+ return rb_obj_untaint(rb_locale_str_new_cstr(tobj->vtm.zone));
}
/*