summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index 72700a6a10..acb6a548b9 100644
--- a/file.c
+++ b/file.c
@@ -3124,8 +3124,8 @@ rb_file_join(ary, sep)
case T_STRING:
break;
case T_ARRAY:
- if (rb_inspecting_p(tmp)) {
- tmp = rb_str_new2("[...]");
+ if (tmp == ary || rb_inspecting_p(tmp)) {
+ rb_raise(rb_eArgError, "recursive array");
}
else {
VALUE args[2];