This is admittedly a bit of a strange problem, but I need to basically empty every element in the array (but keep the element itself).
For example, if I have this array: [ 0, 5, 4, 7, 1 ]
I need to change it to: [ '', '', '', '', '']
I am using Ruby 1.9.3.
Some charting software that I use requires an array for labels, and the only way to hide these labels is to make the corresponding elements empty. Yes, lame.
source share