From: Bill Kelly Date: 2012-03-21T15:40:44+09:00 Subject: [ruby-core:43519] Re: [ruby-trunk - Feature #6180] to_b for converting objects to a boolean value drbrain (Eric Hodel) wrote: > Issue #6180 has been updated by drbrain (Eric Hodel). > > Why do you need to convert objects to boolean values? 1. To avoid breaking encapsulation. For example: def connected? !! @sv end In the above, @sv is an internal resource the caller is never intended to access. 2. To avoid looking obnoxious in logging statements. @logger.trace("#{self.class.name} - #{__method__}: forcing reconnect, current status: connected=#{client.connected?.inspect}") I want that to print: "current status: connected=false" Not: "current status: connected=" Personally I don't mind !! as once one learns the idiom, its intent would seem to be fairly unambiguous. Regards, Bill