try peakmem in ruby

easier to read, but still doesn't work