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

* 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
This commit is contained in:
usa 2016-09-06 01:21:54 +00:00
parent a4ba131a02
commit a260f093be

1
time.c
View file

@ -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 */
}