From 297cd0cbc5c79ac96f6a745e008dbd3a337f8930 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 30 Aug 2017 22:23:45 +0000 Subject: 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 --- lib/net/http/header.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3