diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-30 22:23:45 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-30 22:23:45 +0000 |
commit | 7e8cdaa6c34a1b8d6e6e78c61997a5f863f6c3cc (patch) | |
tree | a273f7e333daaf40b0d1b2f795ed898069807ed2 /lib/net/http | |
parent | 46180152fa16a6c0ce0d963106f71340567bd6c6 (diff) |
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
Diffstat (limited to 'lib/net/http')
-rw-r--r-- | lib/net/http/header.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb index d363dffca5..4777ebf82a 100644 --- a/lib/net/http/header.rb +++ b/lib/net/http/header.rb @@ -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 |