P
Paul Denize
I had unexpected results and could not figure out why
puts (" ".."~").to_a.inspect
returns results of " " thru "9"
m = []
(" "[0].."~"[0]).to_a.each{|c| m << c.chr}
puts m.inspect
Is a longwinded way of getting the samne but it gives all the results
" " thru "~"
Can anyone tell me why this is so?
I also hear that to_a is to be depricated - but it is hard to figure out
what the alternatives are. Everything I found gave the same unexpeted
results.
Paul
puts (" ".."~").to_a.inspect
returns results of " " thru "9"
m = []
(" "[0].."~"[0]).to_a.each{|c| m << c.chr}
puts m.inspect
Is a longwinded way of getting the samne but it gives all the results
" " thru "~"
Can anyone tell me why this is so?
I also hear that to_a is to be depricated - but it is hard to figure out
what the alternatives are. Everything I found gave the same unexpeted
results.
Paul