title: Passing an operator to a function?
body: <p>Perhaps this just sounds ridiculous but I'm wondering is this possible with Ruby? Basically I have a function...</p>
  
  <pre><code>def add a,b
   c = a + b
   return c
  end
  </code></pre>
  
  <p>I'd like to be able to pass the "+" or another operator e.g "-" to the function so that it'd be something like...</p>
  
  <pre><code>def sum a,b,operator
   c = a operator b
   return c
  end
  </code></pre>
  
  <p>is this possible?</p>