1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

to_str -> to_s

* lib/net/http/header.rb (set_field): `val` can not have `to_str`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2017-08-30 22:23:45 +00:00
parent 46180152fa
commit 7e8cdaa6c3

View file

@ -75,7 +75,7 @@ module Net::HTTPHeader
append_field_value(ary, val)
@header[key.downcase] = ary
else
val = val.to_str
val = val.to_s
if /[\r\n]/.match?(val)
raise ArgumentError, 'header field value cannnot include CR/LF'
end