Project

General

Profile

Actions

Feature #6180

closed

to_b for converting objects to a boolean value

Added by AaronLasseigne (Aaron Lasseigne) over 12 years ago. Updated over 12 years ago.

Status:
Rejected
Target version:
-
[ruby-core:43502]

Description

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.


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Feature #8273: Make it possible to treat objects as falsy in order to make NullObjects more convenientRejectedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0