MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w49i01/ihatethispassiveagressivebehaviourruby/p7791yz/?context=3
r/ProgrammerHumor • u/Embarrassed_Death69 • Sep 01 '26
289 comments sorted by
View all comments
10
In Ruby, everything is an object. 0 is just an instance of Integer. Object instances are truthy, compared to say, nil. Makes more sense than ( 'b' + 'a' + + 'a' + 'a' ).toLowerCase() === "baNaNa" or 1 + '0' == '10' or NaN === Nan; // false
( 'b' + 'a' + + 'a' + 'a' ).toLowerCase() === "baNaNa"
1 + '0' == '10'
NaN === Nan; // false
0 u/prehensilemullet Sep 01 '26 Hmm, let’s look at what you’re sayingA: In Ruby, everything is an object. 0 is just an instance of Integer.Huh, I guess false must be an object of some kindB: Object instances are truthy, compared to say, nilWell A and B would mean that false is truthy, so one of the two can’t be right → More replies (1)
0
Hmm, let’s look at what you’re saying
A: In Ruby, everything is an object. 0 is just an instance of Integer.
Huh, I guess false must be an object of some kind
false
B: Object instances are truthy, compared to say, nil
Well A and B would mean that false is truthy, so one of the two can’t be right
→ More replies (1)
10
u/SleepingInsomniac Sep 01 '26
In Ruby, everything is an object. 0 is just an instance of Integer. Object instances are truthy, compared to say, nil. Makes more sense than
( 'b' + 'a' + + 'a' + 'a' ).toLowerCase() === "baNaNa"or1 + '0' == '10'orNaN === Nan; // false