Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use friendlier terminology in _leaf_helpers.erb #2009

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions tool/ruby_vm/views/_leaf_helpers.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ leafness_of_getglobal(VALUE gentry)
else {
/* We cannot write this function using a switch() because a
* case label cannot be a function pointer. */
static rb_gvar_getter_t *const whitelist[] = {
static rb_gvar_getter_t *const allowlist[] = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allowedList?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this comment and here suggest allowlist. What do you think?

rb_gvar_val_getter,
rb_gvar_var_getter,
rb_gvar_undef_getter,
};
rb_gvar_getter_t *f = rb_gvar_getter_function_of(e);
int i;

for (i = 0; i < numberof(whitelist); i++) {
if (f == whitelist[i]) {
for (i = 0; i < numberof(allowlist); i++) {
if (f == allowlist[i]) {
return true;
}
}
Expand All @@ -46,7 +46,7 @@ leafness_of_setglobal(VALUE gentry)
else {
/* We cannot write this function using a switch() because a
* case label cannot be a function pointer. */
static rb_gvar_setter_t *const whitelist[] = {
static rb_gvar_setter_t *const allowlist[] = {
rb_gvar_val_setter,
rb_gvar_readonly_setter,
rb_gvar_var_setter,
Expand All @@ -55,8 +55,8 @@ leafness_of_setglobal(VALUE gentry)
rb_gvar_setter_t *f = rb_gvar_setter_function_of(e);
int i;

for (i = 0; i < numberof(whitelist); i++) {
if (f == whitelist[i]) {
for (i = 0; i < numberof(allowlist); i++) {
if (f == allowlist[i]) {
return true;
}
}
Expand Down