summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ext/date/date_parse.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4faa44b0dc..26384c77d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Aug 9 22:57:45 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * 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.
+
Tue Aug 9 14:25:47 2011 Naohisa Goto <ngotogenome@gmail.com>
* ext/fiddle/conversions.c (generic_to_value): ffi_arg and ffi_sarg
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;