# New Ticket Created by  Aleks-Daniel Jakimenko-Aleksejev 
# Please include the string:  [perl #130449]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=130449 >


Code:
say (2..1)[^10]


Result (2015.12,2016.02):
(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)


Result (2016.03,HEAD):
Index out of range. Is: 0, should be in 0..-1
  in block <unit> at /tmp/1dJcD1E1Wz line 1

Actually thrown at:
in block <unit> at /tmp/1dJcD1E1Wz line 1


Bisectable points to 
https://github.com/rakudo/rakudo/commit/7cbf2d302c561d74f38e7bb800d466ec4accfd21


It seems that most things produce Nils in similar cases, so the previous 
behavior was correct. For example, (2,3,4)[^5] will give (2 3 4 Nil Nil), I 
don't see any reason for ranges to behave differently (especially to error out 
with an error message like this…)

Reply via email to