summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/array.c b/array.c
index 1c8172aef4b..ee69729e3bd 100644
--- a/array.c
+++ b/array.c
@@ -1275,7 +1275,7 @@ rb_ary_slice_bang(argc, argv, ary)
if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
pos = NUM2LONG(arg1);
len = NUM2LONG(arg2);
-delete_pos_len:
+ delete_pos_len:
if (pos < 0) {
pos = RARRAY(ary)->len + pos;
}
@@ -1288,9 +1288,7 @@ delete_pos_len:
goto delete_pos_len;
}
- rb_ary_delete_at(ary, NUM2LONG(arg1));
-
- return arg2;
+ return rb_ary_delete_at(ary, NUM2LONG(arg1));
}
static VALUE