Project

General

Profile

Actions

Bug #16969

closed

False positive for warning against `public` without arguments inside method

Added by deivid (David Rodríguez) almost 4 years ago. Updated almost 4 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
[ruby-core:98868]

Description

Hi!

When running the following code:

  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.

Actions

Also available in: Atom PDF

Like0
Like0Like0