The following code outputs the output of "xyz"
a = %w{x y z}
print a.to_s
Is there an option that can be added to a block to add spaces?
For example, I thought that by changing the code to this, I could use a space - separate the elements to output the output of "xy z"
a = %w{"x " "y " "z "}
print a.to_s
Instead, it produces this:
"x", "y", "g"
K. berman
source
share