If you use %W() the character " is not special inside it. Look at it again
knowing that " is not special.
 Em 05/07/2014 10:26, "Arup Rakshit" <aruprakshit / rocketmail.com> escreveu:

> Hi,
>
> Look the below code :-
>
> #!/usr/bin/env ruby
>
> # expected
> %W("hello world") # => ["\"hello", "world\""]
>
> #unexpected
> str = "hello world"
> %W(#{str}) # => ["hello world"]
>
> Can anyone explain these 2 different behavior ?
>
> --
> ================
> Regards,
> Arup Rakshit
> ================
> Debugging is twice as hard as writing the code in the first place.
> Therefore,
> if you write the code as cleverly as possible, you are, by definition, not
> smart enough to debug it.
>
> --Brian Kernighan
>