JustinFeng (Justin Feng)
- Login: JustinFeng
- Registered on: 01/10/2020
- Last sign in: 01/11/2020
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
01/11/2020
-
11:50 AM Ruby Bug #16496 (Feedback): Numbered Parameter not parsed properly in lambda
-
11:49 AM Ruby Bug #16496: Numbered Parameter not parsed properly in lambda
- mame (Yusuke Endoh) wrote:
> `_1 *1` is parsed as `_1(*1)`, a call to a method `_1` with a variable-length argument with `1`. It is the same as `p * ary` and `p *ary`. You can see a warning under verbose mode:
> ...
Hi Yusuke, thank ...
01/10/2020
-
02:21 AM Ruby Bug #16496 (Rejected): Numbered Parameter not parsed properly in lambda
- The space between `*` and `1` changes the lambda behaviour, looks like numbered parameter `_1` is not parsed properly
```
2.7.0 :001 > l = -> { _1 * 1 }
2.7.0 :002 > l[2]
=> 2
2.7.0 :003 > l2 = -> { _1 *1 }
2.7.0 :004 > l2[2]
T...