title: What is the difference between '&&' and '&' in Ruby
body: <p>Recently, I observed a very interesting result in Ruby while making use of &amp;&amp; and &amp; for the input combination of 0 &amp; 1. </p>
  
  <p>Can someone please explain the below output with respect to the above mentioned two operators? The below is implemented using Ruby 2.0.0-p451</p>
  
  <pre><code>2.0.0-p451 :006 &gt; 0 &amp;&amp; 1
   =&gt; 1 
  
  
  2.0.0-p451 :008 &gt; 0 &amp; 1
   =&gt; 0 
  </code></pre>
  
  <p>Thank you</p>