Issue #6180 has been updated by AaronLasseigne (Aaron Lasseigne).


I think that "to_b" is more clear and fits well with the other to_*. Using "!!" isn't the most obvious choice for people looking to create a boolean. I am a bit disheartened to find out that it's slower.
----------------------------------------
Feature #6180: to_b for converting objects to a boolean value
https://bugs.ruby-lang.org/issues/6180#change-24989

Author: AaronLasseigne (Aaron Lasseigne)
Status: Open
Priority: Normal
Assignee: 
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/