[前][次][番号順一覧][スレッド一覧]

ruby-changes:47579

From: ko1 <ko1@a...>
Date: Thu, 31 Aug 2017 07:23:51 +0900 (JST)
Subject: [ruby-changes:47579] ko1:r59695 (trunk): to_str -> to_s

ko1	2017-08-31 07:23:45 +0900 (Thu, 31 Aug 2017)

  New Revision: 59695

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59695

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

  Modified files:
    trunk/lib/net/http/header.rb
Index: lib/net/http/header.rb
===================================================================
--- lib/net/http/header.rb	(revision 59694)
+++ lib/net/http/header.rb	(revision 59695)
@@ -75,7 +75,7 @@ module Net::HTTPHeader https://github.com/ruby/ruby/blob/trunk/lib/net/http/header.rb#L75
       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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]