There is a Ruby convention for naming methods using bang ( ! ). The convention is that if the method modifies self , we use bang to tell others about the self-mutating bahaviour.
For example, Array#select does not change self , but Array#select! does. But Array#keep_if changing itself. Nothing called Array#keep_if! .
What could be the reason for not following the convention?
source share