# Re: nuby: %w to understand quotes

**URL:** <https://www.ruby-forum.com/t/re-nuby-w-to-understand-quotes/94170>\
**Category:** Ruby\
**Created:** [April 24, 2006, 3:05am UTC](https://www.ruby-forum.com/t/re-nuby-w-to-understand-quotes/94170 "2006-04-24T03:05:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeSSSSaS\_Botp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ecd19e/32.png) [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Post date:** [April 24, 2006, 3:05am UTC](https://www.ruby-forum.com/t/re-nuby-w-to-understand-quotes/94170/1 "2006-04-24T03:05:54Z")

</div>

David C. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] :

# But why? %w is intended as a shortcut when everthing is a

# single word. For

# anything else, use quotes.

yes, you’re right. maybe, i was looking for a shortcut on word or  
“phrases of words” 🙂

kind regards -botp

---

<div class="post-metadata">

**Author:** ![PeSSSSaS\_Botp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ecd19e/32.png) [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Post date:** [April 24, 2006, 3:21am UTC](https://www.ruby-forum.com/t/re-nuby-w-to-understand-quotes/94170/2 "2006-04-24T03:21:19Z")

</div>

On Mon, 2006-04-24 at 10:03 +0900, PeÃ±a wrote:

> David C. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] :
> 
> # But why? %w is intended as a shortcut when everthing is a
> 
> # single word. For
> 
> # anything else, use quotes.
> 
> yes, you’re right. maybe, i was looking for a shortcut on word or “phrases of words” 🙂

Perhaps you are looking for shellwords?

require ‘shellwords’  
Shellwords.shellwords %{this is “just a” test}

# =\> [“this”, “is”, “just a”, “test”]
