aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-06 01:21:54 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-06 01:21:54 +0000
commit210a81c4d6e3394220da0a07b9e4b252e08c0b87 (patch)
treed0b4c262a30e79cb7d80fa3a8d39ab996f5b3055
parent76aac939420c74fc7f37cc959bed252d4bd5cb9e (diff)
downloadruby-210a81c4d6e3394220da0a07b9e4b252e08c0b87.tar.gz
* time.c (obj2subsecx): subsec might be GC'ed. try to get rid of SEGV on mswin
CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--time.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/time.c b/time.c
index 9f009b5a15..1c5fb87dad 100644
--- a/time.c
+++ b/time.c
@@ -2453,6 +2453,7 @@ obj2subsecx(VALUE obj, VALUE *subsecx)
else {
divmodv(num_exact(obj), INT2FIX(1), &obj, &subsec);
*subsecx = w2v(rb_time_magnify(v2w(subsec)));
+ RB_GC_GUARD(subsec);
}
return obj2ubits(obj, 6); /* vtm->sec */
}