[英]NoMethodError: undefined method `<<' net/protocol.rb
I have upgraded an app to ruby from 2.1 to 2.4 and I got the following error message: 我已经将应用程序从2.1升级到ruby到2.4,并且收到以下错误消息:
NoMethodError: undefined method `<<' for {:read_timeout=>60, :continue_timeout=>nil, :debug_output=>nil}:Hash
Did you mean? <
from /Users/me/.rubies/ruby-2.4.3/lib/ruby/2.4.0/net/protocol.rb:219:in `writing'
It seems that something has changed in the net/http library. 似乎net / http库中的某些内容已更改。 Anyone knows what changed and/or how to fix it?
任何人都知道更改的内容和/或如何解决?
def writing
@written_bytes = 0
@debug_output << '<- ' if @debug_output
yield
@debug_output << "\n" if @debug_output
bytes = @written_bytes
@written_bytes = nil
bytes
end
The exception is raised at the first @debug_output
line. 在第一条
@debug_output
行引发异常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.