Re: nuby: %w to understand quotes

David C. [mailto:[email protected]] :

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

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

David C. [mailto:[email protected]] :

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:

Perhaps you are looking for shellwords?

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs