C
Clifford Heath
I've just been tripped up by this behaviour, which I haven't
seen documented anywhere:
"hello".to_a #=> ["hello"]
"".to_a #=> []
Why does an empty string get omitted from the array?
Why doesn't Enumerable#to_a document this behaviour of strings?
This is completely broken (Ruby 1.8.6)
This affected me in a call to send() using a splat - it always
works ok except when the parameter list is an empty string :-(.
Clifford Heath.
seen documented anywhere:
"hello".to_a #=> ["hello"]
"".to_a #=> []
Why does an empty string get omitted from the array?
Why doesn't Enumerable#to_a document this behaviour of strings?
This is completely broken (Ruby 1.8.6)
This affected me in a call to send() using a splat - it always
works ok except when the parameter list is an empty string :-(.
Clifford Heath.