From: Yukihiro Matsumoto Date: 2008-11-06T09:20:09+09:00 Subject: Re: is a "?" at end of method name only for boolean result? Hi, In message "Re: is a "?" at end of method name only for boolean result?" on Thu, 6 Nov 2008 07:42:59 +0900, "Greg Hauptmann" writes: |when should I use ? at the end of a method name?. for queries that |return (a) boolean value, or (b) any return values? ie any method that |returns data By convention, they are predicates, which means the return value can be considered as boolean value. But at the same time, the values are not limited to true and false. For example, defined? returns the string to describe the kind of expression defined, and nil otherwise. There's another convention that when a predicate returns non-true value for represent true, it should return nil for false. A bit confusing phrase, can you get it? matz.