title: Ruby: why are inputs passed to send() being wrapped in a Hash?
body: <p>I'm using the send() method in Ruby to invoke a method I've defined. The method takes an <code>OpenStruct</code>.</p>
  <p>Here's a snippet showing how I invoke my method using <code>send</code>:</p>
  <pre><code>my_open_struct = OpenStruct.new(foo: &quot;foo&quot;)
  
  result = @my_object.send(
              :my_method_that_takes_an_openstruct,
              name_of_openstruct_param: my_open_struct)
  </code></pre>
  <p>The problem is that inside <code>my_method_that_takes_an_openstruct</code> the <code>OpenStruct</code> param is getting wrapped in a <code>Hash</code>, resulting in logging output like this:</p>
  <pre><code>Just before calling send #&lt;OpenStruct foo=&quot;foo&quot;&gt;
  Inside my_method_that_takes_an_openstruct: {:name_of_openstruct_param=&gt;#&lt;OpenStruct foo=&quot;foo&quot;&gt;}
  </code></pre>
  <p>Why is this happening, and how can I prevent this wrapping behaviour?</p>