summaryrefslogtreecommitdiff
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
parent4d71d348555f75ea705f8a0e4782e0e5935a7094 (diff)
* 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
-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;