summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index 90acbce6e2..b505775626 100644
--- a/array.c
+++ b/array.c
@@ -734,7 +734,7 @@ rb_ary_insert(argc, argv, ary)
}
pos = NUM2LONG(argv[0]);
if (pos == -1) {
- pos = RSTRING(ary)->len;
+ pos = RARRAY(ary)->len;
}
else if (pos < 0) {
pos++;