summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorKenta Murata <mrkn@users.noreply.github.com>2020-10-21 02:40:18 +0900
committerGitHub <noreply@github.com>2020-10-21 02:40:18 +0900
commita6a8576e877b02b83cabd0e712ecd377e7bc156b (patch)
tree3802e57e38cb467462d19dd266dc4e848d428cc6 /internal
parent081cc4eb283cb01ddffb364397e5175dbfacab66 (diff)
Feature #16812: Allow slicing arrays with ArithmeticSequence (#3241)
* Support ArithmeticSequence in Array#slice * Extract rb_range_component_beg_len * Use rb_range_values to check Range object * Fix ary_make_partial_step * Fix for negative step cases * range.c: Describe the role of err argument in rb_range_component_beg_len * Raise a RangeError when an arithmetic sequence refers the outside of an array [Feature #16812]
Notes
Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
Diffstat (limited to 'internal')
-rw-r--r--internal/range.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/range.h b/internal/range.h
index 0b60f42298..4fe6037c89 100644
--- a/internal/range.h
+++ b/internal/range.h
@@ -34,4 +34,8 @@ RANGE_EXCL(VALUE r)
return RSTRUCT(r)->as.ary[2];
}
+VALUE
+rb_range_component_beg_len(VALUE b, VALUE e, int excl,
+ long *begp, long *lenp, long len, int err);
+
#endif /* INTERNAL_RANGE_H */