-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
Steps to reproduce the problem
# Foo
class Foo < Set
def initialize
super
add?('Default')
end
end
pp Foo.new
Actual behavior
Predicate method names should end with `?`. [Naming/PredicateMethod]
Suggested behavior
No warning.
- No other types are complained about. Thus it seems understood that they are statements, never return values.
- It seems the root cause is a simple oversight of not excluding
initialize
when implementing the cop.
RuboCop version
ruby 2025-08-01 30a20bc16
rubocop 2025-08-12 c34098ee0
System Version: macOS 15.6 (24G84)
Model Identifier: MacBookAir10,1