title: Can an "if (a == b || c == b)" statement be done shorter in Ruby
body: <p>I have a piece of code in Ruby which goes as follows:</p>
  
  <pre><code>def check
    if a == b || c == b
    # execute some code
    # b = the same variable
    end
  end
  </code></pre>
  
  <p>can this be written like</p>
  
  <pre><code>def check
    if a || c == b
    # this doesn't do the trick
    end
    if (a || c) == b
    # this also doesn't do the magic as I thought it would
    end
  end
  </code></pre>
  
  <p>Or in a manner where I don't need to type <code>b</code> twice. This is out of laziness and I would like to know.</p>