mojavelinux (Dan Allen)
- Login: mojavelinux
- Registered on: 03/05/2017
- Last sign in: 03/05/2017
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
03/15/2017
-
09:30 AM Ruby Misc #13283: Disable `&' interpreted as argument prefix warning when passing symbol to Enumerable#map
- Great! Thanks for the update Martin!
-
12:06 AM Ruby Misc #13283: Disable `&' interpreted as argument prefix warning when passing symbol to Enumerable#map
- > Just looking in stdlib, `Set#&` means set intersection, and anyone can define `#&` on any class they like to mean whatever makes sense to them - that's the joy of ruby.
Now I understand where the conflict is. Thank you for pointing ...
03/13/2017
-
08:18 AM Ruby Misc #13283: Disable `&' interpreted as argument prefix warning when passing symbol to Enumerable#map
- Does relaxing the warning condition entail suppressing it for this particular case?
03/06/2017
-
03:54 AM Ruby Misc #13283: Disable `&' interpreted as argument prefix warning when passing symbol to Enumerable#map
- I omit using a slightly different style in a chain.
~~~
(q.map &:w).e.r.t.y
~~~
Effectively, I group the standalone statement inside of (outer) parens.
For me, this provides the visual consistency of omitted parens for when it...
03/05/2017
-
11:45 PM Ruby Misc #13283: Disable `&' interpreted as argument prefix warning when passing symbol to Enumerable#map
- If the warning can't be removed, can we find some other way to write this statement without the need for parentheses?
-
11:43 PM Ruby Misc #13283 (Closed): Disable `&' interpreted as argument prefix warning when passing symbol to Enumerable#map
- A common idiom in Ruby is to pass a symbol reference to `Enumerable#map`, which in turn invokes the corresponding method on each entry.
Case in point:
~~~
%(a b c).map &:upcase
~~~
Yet, when warnings are enabled, this line pro...