Why is a method power!in the Ruby class Fixnumcalled with an exclamation mark? By convention, methods that have a name ending in! potentially dangerous (for example, they may somehow modify the instance).
I can appreciate the difference between gsuband gsub!in String, but what about power!? It does not seem to modify the instance Fixnumor perform any other “dangerous” actions; it just returns the result.
source
share