From: deivid.rodriguez@... Date: 2020-06-18T14:52:35+00:00 Subject: [ruby-core:98868] [Ruby master Bug#16969] False positive for warning against `public` without arguments inside method Issue #16969 has been reported by deivid (David Rodr�guez). ---------------------------------------- Bug #16969: False positive for warning against `public` without arguments inside method https://bugs.ruby-lang.org/issues/16969 * Author: deivid (David Rodr�guez) * Status: Open * Priority: Normal * ruby -v: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- Hi! When running the following code: ```ruby def setup # make public so we can test it Admin::UsersController.send(:public, *Admin::UsersController.protected_instance_methods) end ``` I'm getting the following warning: ``` warning: calling public without arguments inside a method may not have the intended effect ``` It looks like a false positive to me. I'm guessing it's a bug in https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/2993b24a1ecc5fa3cc9f140bfd80669c3a3b7b9c. -- https://bugs.ruby-lang.org/ Unsubscribe: