Forum: Ruby empty element in string array?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Simon S. (Guest)
on 2006-03-06 18:45
(Received via mailing list)
%w(a \  b)     #-> ["a", " ", "b"]


is it possible to get output ["a", "", "b"]  ?
Simon S. (Guest)
on 2006-03-06 18:45
(Received via mailing list)
On 3/6/06, Simon S. <removed_email_address@domain.invalid> wrote:
> %w(a \  b)     #-> ["a", " ", "b"]
>
>
> is it possible to get output ["a", "", "b"]  ?
>

argh.. nevermind

%W(a #{} b)  #=> ["a", "", "b"]
This topic is locked and can not be replied to.