1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core
Jeremy Evans cfb9624460
Fix Array#[] with ArithmeticSequence with negative steps (#5739)
* Fix Array#[] with ArithmeticSequence with negative steps

Previously, Array#[] when called with an ArithmeticSequence
with a negative step did not handle all cases correctly,
especially cases involving infinite ranges, inverted ranges,
and/or exclusive ends.

Fixes [Bug #18247]

* Add Array#slice tests for ArithmeticSequence with negative step to test_array

Add tests of rb_arithmetic_sequence_beg_len_step C-API function.

* Fix ext/-test-/arith_seq/beg_len_step/depend

* Rename local variables

* Fix a variable name

Co-authored-by: Kenta Murata <3959+mrkn@users.noreply.github.com>
2022-08-11 19:16:49 +09:00
..
argf
array Fix Array#[] with ArithmeticSequence with negative steps (#5739) 2022-08-11 19:16:49 +09:00
basicobject
binding Update to ruby/spec@d6921ef 2021-10-20 21:41:46 +02:00
builtin_constants Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
class Remove Class#descendants 2021-12-20 11:02:15 -08:00
comparable Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
complex Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
conditionvariable Update to ruby/spec@d6921ef 2021-10-20 21:41:46 +02:00
data
dir Update to ruby/spec@ab32a1a 2022-06-26 14:50:14 +02:00
encoding Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
enumerable Update to ruby/spec@cbfaf51 2022-07-27 17:18:25 +02:00
enumerator Update to ruby/spec@cbfaf51 2022-07-27 17:18:25 +02:00
env Fix spec version guard 2022-06-16 16:34:14 -04:00
exception Update to ruby/spec@ab32a1a 2022-06-26 14:50:14 +02:00
false Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
fiber Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
file Update to ruby/spec@cbfaf51 2022-07-27 17:18:25 +02:00
filetest
float Update to ruby/spec@ab32a1a 2022-06-26 14:50:14 +02:00
gc Fix GC.total_time example 2021-11-30 08:49:41 +09:00
hash Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
integer Update to ruby/spec@ab32a1a 2022-06-26 14:50:14 +02:00
io Test that File.read defaults to text mode 2022-08-05 14:34:08 -04:00
kernel Only allow procs created by Symbol#to_proc to call public methods 2022-08-10 13:02:19 -07:00
main Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
marshal Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
matchdata Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
math Update to ruby/spec@ab32a1a 2022-06-26 14:50:14 +02:00
method Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
module Update to ruby/spec@ab32a1a 2022-06-26 14:50:14 +02:00
mutex
nil Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
numeric Update to ruby/spec@902ab83 2022-01-28 14:42:38 +01:00
objectspace Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
proc Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
process Fix Process.clock_gettime specs on OpenBSD 2022-06-26 12:39:16 -07:00
queue
random Update to ruby/spec@aaf998f 2022-03-28 17:47:04 +02:00
range Update to ruby/spec@cbfaf51 2022-07-27 17:18:25 +02:00
rational Update to ruby/spec@82cd3a3 2022-03-03 14:43:14 +01:00
refinement Remove Refinement#{extend_object,append_features,prepend_features} 2022-01-05 10:59:03 -08:00
regexp Update to ruby/spec@cbfaf51 2022-07-27 17:18:25 +02:00
signal Update to ruby/spec@ab32a1a 2022-06-26 14:50:14 +02:00
sizedqueue
string Update to ruby/spec@cbfaf51 2022-07-27 17:18:25 +02:00
struct Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
symbol Only allow procs created by Symbol#to_proc to call public methods 2022-08-10 13:02:19 -07:00
systemexit
thread Update to ruby/spec@ab32a1a 2022-06-26 14:50:14 +02:00
threadgroup
time Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
tracepoint Fix spec description 2022-03-29 18:14:33 -07:00
true Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
unboundmethod Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
warning Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00