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 | 297cd0cbc5c79ac96f6a745e008dbd3a337f8930 (patch) | |
tree | a273f7e333daaf40b0d1b2f795ed898069807ed2 /lib | |
parent | d15dd5d81d1ec8f735afb72bf11fc11e98fd28a4 (diff) | |
download | ruby-297cd0cbc5c79ac96f6a745e008dbd3a337f8930.tar.gz |
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')
-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 |