diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-04 14:24:16 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-04 14:24:16 +0000 |
commit | af9b0da125871c6bfbc3b7893d199a79420e5833 (patch) | |
tree | e93349e2c178a202d3fb4688db0ed76358b3a97a /gc.c | |
parent | 6d022ae147c8b226e9b41a446cd254871cb64719 (diff) | |
download | ruby-af9b0da125871c6bfbc3b7893d199a79420e5833.tar.gz |
Avoid usage of the magic number `(NODE*)-1`
This magic number has two meanings depending upon the context:
* "required keyword argument (no name)" on NODE_LASGN (`def foo(x:)`)
* "rest argument (no name)" on NODE_MASGN and NODE_POSTARG
('a, b, * = ary` or `a, b, *, z = ary`)
To show this intention explicitly, two macros are introduced:
NODE_SPECIAL_REQUIRED_KEYWORD and NODE_SPECIAL_NO_NAME_REST.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
0 files changed, 0 insertions, 0 deletions