Bin ich Ruby hier grundsätzlich falsch? Ich habe Code Rubin geschrieben für ca. 2 Jahre jetzt und nur auf diese heute gestolpert ...i = wahr und falsch in Ruby ist wahr?
ruby-1.8.7-p249 > i = true and false
=> false
ruby-1.8.7-p249 > i
=> true
Könnte jemand erklären, was hier vor sich geht, bitte? Ich bin sicher, dass es spec ist, aber es scheint nur unlogisch mir ...
Sie "warum" Teil ist ein Duplikat von http://stackoverflow.com/questions/1434842/is-there-any-whisdom-behide-and-or-operator-in-ruby, und was ist ein Teil Duplikat von http://stackoverflow.com/questions/372652/what-are-the-ruby-gotchas-a-newbie-should-be-warned-about –