[前][次][番号順一覧][スレッド一覧]

ruby-changes:53448

From: nobu <ko1@a...>
Date: Sun, 11 Nov 2018 10:25:39 +0900 (JST)
Subject: [ruby-changes:53448] nobu:r65664 (trunk): Use friendlier terminology in leaf helpers

nobu	2018-11-11 10:25:33 +0900 (Sun, 11 Nov 2018)

  New Revision: 65664

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65664

  Log:
    Use friendlier terminology in leaf helpers
    
    [Fix GH-2009]
    
    From: Juanito Fatas <juanito.fatas@s...>

  Modified files:
    trunk/tool/ruby_vm/views/_leaf_helpers.erb
Index: tool/ruby_vm/views/_leaf_helpers.erb
===================================================================
--- tool/ruby_vm/views/_leaf_helpers.erb	(revision 65663)
+++ tool/ruby_vm/views/_leaf_helpers.erb	(revision 65664)
@@ -18,7 +18,7 @@ leafness_of_getglobal(VALUE gentry) https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_leaf_helpers.erb#L18
     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,
@@ -26,8 +26,8 @@ leafness_of_getglobal(VALUE gentry) https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_leaf_helpers.erb#L26
         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;
             }
         }
@@ -46,7 +46,7 @@ leafness_of_setglobal(VALUE gentry) https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_leaf_helpers.erb#L46
     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,
@@ -55,8 +55,8 @@ leafness_of_setglobal(VALUE gentry) https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_leaf_helpers.erb#L55
         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;
             }
         }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]