summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 4f62cb2125..f456e8b867 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()) {