aboutsummaryrefslogtreecommitdiffstats
path: root/ext/date/date_parse.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-09 14:00:49 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-09 14:00:49 +0000
commit0bd01d00585400b11649072a1d72cb3c740abf91 (patch)
tree6786536a58d53f16813380eed883f7d147a9e0ae /ext/date/date_parse.c
parent4d71d348555f75ea705f8a0e4782e0e5935a7094 (diff)
downloadruby-0bd01d00585400b11649072a1d72cb3c740abf91.tar.gz
* ext/date/date_parse.c (date_zone_to_diff): add RB_GC_GUARD.
[ruby-dev:44337] [Bug #5152] * ext/date/data_parse.c (parse_ddd_cb): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date/date_parse.c')
-rw-r--r--ext/date/date_parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c
index 3605ff7f65..9b8ff36838 100644
--- a/ext/date/date_parse.c
+++ b/ext/date/date_parse.c
@@ -530,6 +530,7 @@ date_zone_to_diff(VALUE str)
}
}
}
+ RB_GC_GUARD(str);
ok:
return offset;
}
@@ -1322,6 +1323,7 @@ parse_ddd_cb(VALUE m, VALUE hash)
set_hash("yday", INT2FIX(n2i(cs2, 4, 3)));
}
break;
+ RB_GC_GUARD(s2);
}
if (!NIL_P(s3)) {
cs3 = RSTRING_PTR(s3);
@@ -1353,6 +1355,7 @@ parse_ddd_cb(VALUE m, VALUE hash)
break;
}
}
+ RB_GC_GUARD(s3);
}
if (!NIL_P(s4)) {
l4 = RSTRING_LEN(s4);
@@ -1391,6 +1394,7 @@ parse_ddd_cb(VALUE m, VALUE hash)
*--s1 = '+';
set_hash("offset", date_zone_to_diff(rb_str_new2(s1)));
}
+ RB_GC_GUARD(s5);
}
return 1;