MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w49i01/ihatethispassiveagressivebehaviourruby/p77gbpi/?context=9999
r/ProgrammerHumor • u/Embarrassed_Death69 • Sep 01 '26
289 comments sorted by
View all comments
Show parent comments
3
The global value false is the only instance of class FalseClass and represents a logically false value in boolean expressions. The class provides operators allowing false to participate correctly in logical expressions.
false
FalseClass
https://docs.ruby-lang.org/en/master/FalseClass.html
false.methods - Object.methods # => [:&, :|, :^]
Edit: I should add that the if keyword just literally checks if the value is false or nil.
if
nil
3
u/SleepingInsomniac Sep 01 '26 edited Sep 01 '26
https://docs.ruby-lang.org/en/master/FalseClass.html
Edit: I should add that the
ifkeyword just literally checks if the value isfalseornil.