title: NoMethodError: undefined method `<<' net/protocol.rb
body: <p>I have upgraded an app to ruby from 2.1 to 2.4 and I got the following error message:</p>
  
  <pre><code>NoMethodError: undefined method `&lt;&lt;' for {:read_timeout=&gt;60, :continue_timeout=&gt;nil, :debug_output=&gt;nil}:Hash
  Did you mean?  &lt;
  from /Users/me/.rubies/ruby-2.4.3/lib/ruby/2.4.0/net/protocol.rb:219:in `writing'
  </code></pre>
  
  <p>It seems that something has changed in the net/http library. Anyone knows what changed and/or how to fix it?</p>
  
  <pre><code>def writing
    @written_bytes = 0
    @debug_output &lt;&lt; '&lt;- ' if @debug_output
    yield
    @debug_output &lt;&lt; "\n" if @debug_output
    bytes = @written_bytes
    @written_bytes = nil
    bytes
  end
  </code></pre>
  
  <p>The exception is raised at the first <code>@debug_output</code> line.</p>