Allow Array#[] to receive Range of optional Integer by pocke · Pull Request #732 · ruby/rbs
Array#[] and Array#[]= accept a Range of optional Integer as the argument in Ruby, but the RBS doesn't allow it unexpectedly. By the way, String#[] already accepts it.