summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--dir.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b2bbf79..17215a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Feb 16 14:52:46 2014 Eric Wong <e@80x24.org>
+
+ * dir.c (dir_s_glob): RB_GC_GUARD instead of volatile
+
Sun Feb 16 14:33:52 2014 Tanaka Akira <akr@fsij.org>
* include/ruby/ruby.h (RBIGNUM_SIGN): Defined for compatibility.
diff --git a/dir.c b/dir.c
index 4f62cb2..f456e8b 100644
--- a/dir.c
+++ b/dir.c
@@ -1912,8 +1912,9 @@ dir_s_glob(int argc, VALUE *argv, VALUE obj)
ary = rb_push_glob(str, flags);
}
else {
- volatile VALUE v = ary;
+ VALUE v = ary;
ary = dir_globs(RARRAY_LEN(v), RARRAY_CONST_PTR(v), flags);
+ RB_GC_GUARD(v);
}
if (rb_block_given_p()) {