aboutsummaryrefslogtreecommitdiffstats
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 13f1a51c7f..be594b439b 100644
--- a/dir.c
+++ b/dir.c
@@ -1629,7 +1629,8 @@ dir_s_glob(int argc, VALUE *argv, VALUE obj)
ary = rb_push_glob(str, flags);
}
else {
- ary = dir_globs(RARRAY_LEN(ary), RARRAY_PTR(ary), flags);
+ volatile VALUE v = ary;
+ ary = dir_globs(RARRAY_LEN(v), RARRAY_PTR(v), flags);
}
if (rb_block_given_p()) {