From: 13 Date: 2006-03-22T02:12:18+09:00 Subject: Re: ! and ? in function name Hi, Here is an excerpt from the free online version of the Programming Ruby book [1]: ... Methods that act as queries are often named with a trailing ``?'', such as instance_of?. Methods that are ``dangerous,'' or modify the receiver, might be named with a trailing ``!''. For instance, String provides both a chop and a chop!. The first one returns a modified string; the second modifies the receiver in place. ``?'' and ``!'' are the only weird characters allowed as method name suffixes. .. [1] http://www.rubycentral.com/book/tut_methods.html Martins On 3/21/06, Tony wrote: > Hi Ruby-rulez ! > > I often look at some code, for example un rails/active_record, where > functions name end with a ? or a ! > > Is this a special notation, meaning that the func or args or whatever > have some treatment before/after the body ? Or to show that the function > return a boolean (?) and the arg modified (!) ? > > Thanx ;) > > -- > Posted via http://www.ruby-forum.com/. > >