title: Ruby: using Object.send for assigning variables
body: <p>Is there any way to do something like this?</p>
  
  <pre><code>a = Struct.new(:c).new(1)
  b = Struct.new(:c).new(2)
  
  a.send(:c)
  =&gt; 1
  
  b.send(:c)
  =&gt; 2
  
  a.send(:c) = b.send(:c)
  </code></pre>
  
  <p>The last line result in error:</p>
  
  <pre><code>syntax error, unexpected '=', expecting $end
  a.send(:c) = b.send(:c)
              ^
  </code></pre>