I’m pretty new to Ruby so perhaps some of you could help me out with a
little problem I’ve come up against. I have an array consisting of
integers (called session[:octets_in]). What I want to do is create an
array comprising of the difference between the current element and the
previous element (e.g. [“1000”, “1100”, “1200”] would become [“100”,
“200”]). I’m not entirely sure how to go about this, so any pointers
would be welcome.