The `Shellwords` module is currently a little too conservative: `+` isn't a token in Bourne sh[1], but `Shellwords` escapes it anyways. Actual: ~~~ ruby >> Shellwords.escape 'foo+bar' #=> "foo\\+bar" ~~~ Expected: ~~~ ruby ...woodruffw (William Woodruff)
Nobuyoshi Nakada wrote: > What about > ... Ah, I forgot about that... That definitely works, and solves the problem without a need for new syntax. Please close if you don't see the need for these changes. Thanks!woodruffw (William Woodruff)
The current Hash#default_proc flow usually looks something like this: ~~~ ruby my_hash = { key: "value" } my_hash.default_proc = proc { |h, k| h[k] = "other value" } ~~~ This makes the common practice of freezing large constant ...woodruffw (William Woodruff)