1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

zone may be ASCII-8BIT on Windows [Bug #10887]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2015-02-23 09:32:27 +00:00
parent a525fbf06f
commit 5b4afd0281

2
time.c
View file

@ -4194,7 +4194,7 @@ time_isdst(VALUE time)
static VALUE
time_zone_name(const char *zone)
{
VALUE name = rb_usascii_str_new_cstr(zone);
VALUE name = rb_usascii_str_new_cstr(zone); /* zone may be ASCII-8BIT on Windows */
if (!rb_enc_str_asciionly_p(name)) {
name = rb_external_str_with_enc(name, rb_locale_encoding());
}