M
Mark V
Hi,
Thanks for all the fantastic work that has gone into ruby. Even
though I am new it has proved to be very impressive.
To my question.
I've seen the following code:
@vara, @varb = "ab,ac,ad,ae".split(",")
the way @vara and @varb were used makes me think the writer expected
the following:
puts @vara.inspect # "ab"
puts @varb.inspect # ["ac", "ad", "ae"]
However when I run this code I get
puts @vara.inspect # "ab"
puts @varb.inspect # "ac"
Is there a way to achieve the writer seemed to have in mind?
Thanks in advance
Mark
Thanks for all the fantastic work that has gone into ruby. Even
though I am new it has proved to be very impressive.
To my question.
I've seen the following code:
@vara, @varb = "ab,ac,ad,ae".split(",")
the way @vara and @varb were used makes me think the writer expected
the following:
puts @vara.inspect # "ab"
puts @varb.inspect # ["ac", "ad", "ae"]
However when I run this code I get
puts @vara.inspect # "ab"
puts @varb.inspect # "ac"
Is there a way to achieve the writer seemed to have in mind?
Thanks in advance
Mark