From: "Jesús Gabriel y Galán" Date: 2010-09-14T23:39:03+09:00 Subject: Re: method! and method? On Tue, Sep 14, 2010 at 4:12 PM, Gene Angelo wrote: > I am trying to find the meaning of ! and ? appended to method names but > I cannot find what they mean. Can someone explain? From the language functionality point of view, they don't mean anything. They just happen to be valid characters for method names, and people can use them to give more readability to their code. The core and stdlib classes, though, typically use ! to denote a "dangerous" method. For example a method that modifies the receiver or some side effect. They usually come in pairs with their counterpart having the same name without the !, and usually it means that they both do the same task, but the ! version will modify the receiver. See for example String#gsub and String#gsub!. The ? on the other hand is typically used when the method is a query method, when calling the method would be like asking the object something. Things like Enumerable#include? or Object#equal? Please take note that these are just conventions of method names. You will find destructive or dangerous methods without a !, and query methods without a ?, and possibly the other way around. Jesus.