From: Li Chen Date: 2006-11-22T01:05:34+09:00 Subject: Re: array question Thank you all for your invalulabe inputs. Based on what I understand and my personal preference I choose the following scripts. Li #### array=[1,2,3,4,5] array_new=Array.new array.each {|e| array_new<<[e,e]} array_new.flatten![1..-2].each{|e| print "#{e}\t" } puts ##output >ruby sur3.rb 1 2 2 3 3 4 4 5 >Exit code: 0 -- Posted via http://www.ruby-forum.com/.