module methods added via extend are wrongly reported as never_called
Closed this issue · 0 comments
alainravet commented
How to reproduce :
$ cd <pp project root>
$ PP_OPTIONS="--show-never-called" bundle exec ruby -Ilib spec/fixtures/bug_22.rb
module Extra
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def a_class_method_via_module_Extra ; end
end
end
class Simple
include Extra
end
Simple.a_class_method_via_module_Extra
$ PP_OPTIONS="--show-never-called" be ruby -Ilib doc/fixtures/bug_22.rb
output :
====================================================================================
= PrivatePlease report : =
====================================================================================
Extra::ClassMethods
* Methods that were never called :
. . . . . . . . . . . . . . . . . . . . .
#a_class_method_via_module_Extra
====================================================================================
Default display overriden :
$PP_OPTIONS = "--show-bad-candidates --show-never-called"