Issue #13977 has been updated by duerst (Martin Drst).

Status changed from Open to Rejected

Anon92929 (Anon Ymous) wrote:
> 0 is false, 1 is true.

Every programming language has its own convention. For example, in shell programming, 0 is true, and 1 (and any other numeric values except 0) are false.

In Ruby, only `false` and `nil` are "falsey". All other values (including 0, 0.0, Rational, BigDecimal, and Complex 0, empty Arrays, Hashes, Sets, and so on) are "truthy". The reason for this is that it's easy to remember. Remembering it is a step to becoming a Rubyist.

----------------------------------------
Bug #13977: 0 should be treated as FALSE
https://bugs.ruby-lang.org/issues/13977#change-67070

* Author: Anon92929 (Anon Ymous)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
0 is false, 1 is true.

It is beyond stupidity that this even needs to be addressed. Fix this please.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>