General

Profile

woodruffw (William Woodruff)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 2 2

Activity

05/13/2018

11:32 PM Ruby Bug #14429: Overzealous escaping of + in Shellwords
Ping (and confirming that this is still the case on `2.5.1p57`). woodruffw (William Woodruff)

01/31/2018

08:09 PM Ruby Bug #14429 (Closed): Overzealous escaping of + in Shellwords
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)

01/11/2017

05:06 AM Ruby Feature #13122: Special syntax for Hash#default_proc
Realized I forgot commas in the examples:
~~~ruby
my_hash = {
key: "value",
*: proc { |h, k| h[k] = "other value" },
}
~~~
and
~~~ruby
my_hash = {
"key" => "value",
* => proc { |h, k| h[k] = "other value" },
}...
woodruffw (William Woodruff)
04:52 AM Ruby Feature #13122: Special syntax for Hash#default_proc
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)
01:46 AM Ruby Feature #13122 (Rejected): Special syntax for Hash#default_proc
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)

Also available in: Atom