last_value = $hash.values["#{$hash.keys.last}".to_i]
I again editted it to get it to work x_x
I'm not sure if -1 index works for aHash object. Simply because there is no mention of it in the documentation whereas there is a mention of it in the Array class documentation. But I could easily be wrong.