Recently, I observed a very interesting result in Ruby while making use of && and & for the input combination of 0 & 1.
I want to understand the below output with respect to the above mentioned two operators. This is implemented using Ruby 2.0.0-p451
2.0.0-p451 :006 > 0 && 1 => 1 2.0.0-p451 :008 > 0 & 1 => 0