Right now I am using the zip method to merge two parallel arrays; one contains the data I am using and the other contains the labels for that data.
outFile.puts failure_labels.zip(failure_percents).join("|")
This call gives me this output:
Build/Compile Failure|26.67%|Unknown Failure|25.45%|User Manifest Failure|25.21
%|Incomplete Build|2.79%|Invalid Clientspec|18.06%|Coverity System Error|0.66%|
Do Not Use Error|0.36%|Version Failure|0.36%|Coverity Defects|0.17%|Flash Build
Error|0.17%|Space Insufficient|0.13%|Integrate Failure|0.04%
But what I am trying to do is only join the inner elements of the 2d array created by zip, something like this:
Build/Compile Failure 26.67%|Unknown Failure 25.45%|User Manifest Failure 25.21
%|Incomplete Build 2.79%|Invalid Clientspec 18.06%|Coverity System Error 0.66%|
Do Not Use Error 0.36%|Version Failure 0.36%|Coverity Defects 0.17%|Flash Build
Error 0.17%|Space Insufficient 0.13%|Integrate Failure 0.04%
Is there any way to do this with the native join? or do I need to create my own function?
Thanks
Someone might think of something more clever, but here’s a quick shot at it: