(1..4).to_a => [1,2,3,4] (1...4).to_a => [1,2,3]
str[a...b] is a substring from a to b, exclusive.
With negative indices:
str[a..-b] == str[a..str.length-b] "abcde"[1..-1] == "abcde"[1..5-1] == "abcde"[1..4] == "bcde" str[a...-b] == str[a...str.length-b] "abcde"[1...-1] == "bcd"