Project

General

Profile

« Previous | Next » 

Revision 1821e9f4

Added by nobu (Nobuyoshi Nakada) about 7 years ago

Fix overwritten zone string

  • time.c (zone_str): while rb_fstring_usascii and the family
    require that the argument string is never modified, tzname may
    point areas which will be discarded by calling tzset().
    make a String then call rb_fstring to copy the zone name.
    when an ID equals TZ environment variable, its name string also
    has modified by changing tzname.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e