a = ['2015',"This is", "one value","test",'9820']
string = a.pack('Z*A*Z*Z*Z*') # => "2015\x00This isone
value\x00test\x009820\x00"
string.unpack('Z*Z*Z*Z*') # => ["2015", "This isone value", "test",
"9820"]

But I want as

["2015", "This is one value", "test", "9820"]

How to do this ?

-- 
Posted via http://www.ruby-forum.com/.