summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 55c1608c5e..293386349e 100644
--- a/dir.c
+++ b/dir.c
@@ -343,7 +343,7 @@ static VALUE dir_close(VALUE);
/* can contain null bytes as separators */ \
(!RB_TYPE_P(str, T_STRING) ? \
FilePathValue(str) : \
- (safe) ? rb_check_safe_obj(str) : (str))
+ (safe) ? (rb_check_safe_obj(str), (str)) : (str))
static VALUE
dir_s_alloc(VALUE klass)