diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-30 07:34:23 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-30 07:34:23 +0000 |
commit | fdec8bb0b30a6c28c7ef4569880b2faf4519c9af (patch) | |
tree | 88849175f562adb9d076935c51715a173af0eb0f /time.c | |
parent | 29fdecfe829258d8cadfaad7e0484a746b1dfdf2 (diff) |
merge revision(s) 45364,45395,45396,45403,45406: [Backport #9652]
* time.c (time_mload): freeze and preserve marshal-loaded time zone
* test/ruby/test_time.rb: add test for GC on loaded object
[Bug #9652]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4887,7 +4887,9 @@ end_submicro: ; time_fixoff(time); } if (!NIL_P(zone)) { + zone = rb_str_new_frozen(zone); tobj->vtm.zone = RSTRING_PTR(zone); + rb_ivar_set(time, id_zone, zone); } return time; |