Actions
Feature #16433
closedProposal: Output warning if `_1` is used in parameter name
Feature #16433:
Proposal: Output warning if `_1` is used in parameter name
Status:
Closed
Assignee:
-
Target version:
-
Description
Currently, output warning if local variable name is _1.
# warning: `_1' is used as numbered parameter
_1 = 42
However, if parameter name is _1, no output warning is issued.
# Actual behavior
# no warning
def hoge(_1);
end
If local variable _1 causes a syntax error in Ruby 3.0(or later ?), I think it is better to output a warning even if you use argument name _1.
# Expected behavior
# warning: `_1' is used as numbered parameter
def hoge(_1);
end
Updated by nobu (Nobuyoshi Nakada) almost 6 years ago
- Status changed from Open to Closed
Applied in changeset git|27ddb6e99848c397a415b785315896ab50308076.
Warn also numbered parameter like parameters
[Feature #16433]
Updated by osyo (manga osyo) almost 6 years ago
Thanks!
Actions