Added proper result typing for RubyStack