Actions
Bug #15825
closedFix a case where numbered parameters should not be allowed
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0dev (2019-05-05 trunk 84e71e9fc1) [x86_64-openbsd]
Description
Because proc{|| @1}
is a syntax error, the following should
also be syntax errors:
proc { |
| @1}
proc { |; a| @1 }
The attached patch makes both of those cases syntax errors.
Files
Updated by nobu (Nobuyoshi Nakada) about 6 years ago
Probably I might think the latter case could be allowed (and forgot to separate these cases), but it doesn't seem worth complicating.
Updated by jeremyevans (Jeremy Evans) about 6 years ago
- Status changed from Open to Closed
Applied in changeset git|b8f3be295b694964e88960c0228459b8aadd114a.
Fix a case where numbered parameters should not be allowed
Because proc{|| @1}
is a syntax error, the following should
also be syntax errors:
proc { |
| @1}
proc { |; a| @1 }
This fixes both cases.
[Bug #15825]
Actions
Like0
Like0Like0