Nuby: %w to understand quotes

David Corbin [mailto:dcorbin@machturtle.com] :

# 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" :slight_smile:

kind regards -botp

Perhaps you are looking for shellwords?

require 'shellwords'
Shellwords.shellwords %{this is "just a" test}
# => ["this", "is", "just a", "test"]

···

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

David Corbin [mailto:dcorbin@machturtle.com] :

# 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" :slight_smile:

--
Ross Bamford - rosco@roscopeco.REMOVE.co.uk