Learning ruby extensions (basic stack implementation)