Skip to content

Commit

Permalink
Use friendlier terminology in leaf helpers
Browse files Browse the repository at this point in the history
[Fix GH-2009]

From: Juanito Fatas <juanito.fatas@shopify.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Nov 11, 2018
1 parent ab97298 commit c8e8f4d
Showing 1 changed file with 6 additions and 6 deletions.
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[] = {
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

0 comments on commit c8e8f4d

Please sign in to comment.