SyntaxFix
Write A Post
Hire A Developer
Questions
Since you've got an array, what you really want is Array#slice, not split.
Array#slice
split
rest = ex.slice(1 .. -1) # or rest = ex[1 .. -1]