Skip to content

Fix descending inclusive ranges

Michael Aaron Murphy requested to merge xTibor:fix-dec-incl-ranges into master

Created by: xTibor

Problem: Descending inclusive range brace expansions calculated its limits incorrectly.

For example the expression {20...10} returned:

20 19 18 17 16 15 14 13 12

instead of

20 19 18 17 16 15 14 13 12 11 10

State: Ready

Other: The range tests in Ion are a bit lacking of edge cases, so I stress tested the fix with this script just to make sure I'm not introducing any regressions.

Merge request reports