summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--re.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fce9bb0..5989943 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jan 28 02:37:18 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * re.c (rb_reg_raise): add GC guard to prevent intermediate
+ variable from GC.
+
Fri Jan 28 02:35:41 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* hash.c (rb_hash_fetch_m): add GC guard to prevent intermediate
diff --git a/re.c b/re.c
index 2157ee8..be815f5 100644
--- a/re.c
+++ b/re.c
@@ -590,7 +590,7 @@ rb_reg_to_s(VALUE re)
static void
rb_reg_raise(const char *s, long len, const char *err, VALUE re)
{
- VALUE desc = rb_reg_desc(s, len, re);
+ volatile VALUE desc = rb_reg_desc(s, len, re);
rb_raise(rb_eRegexpError, "%s: %s", err, RSTRING_PTR(desc));
}