From: "Seth E." Date: 2006-10-24T12:02:52+09:00 Subject: Re: How to remove empty element in an array Li Chen wrote: > I have an array of [1,2,''] I want change it to [1,2]. I check the > document about Array but I can't find a way to remove the empty element. > Any comments? How about this? irb(main):201:0> arr = [1,2,''] => [1, 2, ""] irb(main):202:0> arr -= [''] => [1, 2] -- Posted via http://www.ruby-forum.com/.