From: "AaronLasseigne (Aaron Lasseigne)" Date: 2012-03-31T12:25:36+09:00 Subject: [ruby-core:43992] [ruby-trunk - Feature #6180] to_b for converting objects to a boolean value Issue #6180 has been updated by AaronLasseigne (Aaron Lasseigne). I understand that the Ruby way leans on true and false like values rather than a strict use of true and false. The use case here is encapsulating data that you might not want to expose when returning from a "?" method and, at an individuals discretion, creating a less verbose return value that is slightly easier to read when debugging. In my opinion to_bool is a more consistent and understandable type conversion than "!!" in these situations. This is a fairly minor request and probably not worth more discussion. Thank you everyone for reviewing it in a timely manor. P.S. Matz, congrats on your recent award. ---------------------------------------- Feature #6180: to_b for converting objects to a boolean value https://bugs.ruby-lang.org/issues/6180#change-25514 Author: AaronLasseigne (Aaron Lasseigne) Status: Rejected Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: Target version: When a boolean return value is required it has become common practice is to use "!!" to convert the object. It would be more consistent to provide a "to_b" method on Object. -- http://bugs.ruby-lang.org/