3 ms·
I found it very odd that he would place false before true, but then I realized that's probably just the C mindset leaking through.
by technomancy 15y ago
I found it very odd that he would place false before true, but then I realized that's probably just the C mindset leaking through.
- macournoyer 15y agoSince in Ruby false and nil are the only "falsish" values and everything else is true, their values has been chosen to make a boolean test as efficient as possible. See: https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L374 https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#...