Mr eel
Some Ruby Love
A single line of code to split a string into an array, then go through each entry and convert it into an integer.
date = string.split('-').collect {|entry| entry.to_i}
Something so complicated in another language turns out to be one line. *sob* I luv you Ruby!
Comments