aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-09 07:28:10 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-09 07:28:10 +0000
commitb64c0c9a2414c19617e4232942e04bb5064456cd (patch)
tree1de6a6fa2bf380b47ca475ccf3b0248e05e6d15b /lib/net
parentca36deeb35622af5cf269aee9c7ed034d6cf9407 (diff)
downloadruby-b64c0c9a2414c19617e4232942e04bb5064456cd.tar.gz
* lib/net/ftp.rb: use frozen_string_literal: true.
* test/net/ftp/test_buffered_socket.rb: ditto. * test/net/ftp/test_ftp.rb: ditto. * test/net/ftp/test_mlsx_entry.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/ftp.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
index 9ce161b7e7..2269b750d1 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -1,4 +1,6 @@
#
+# -*- frozen_string_literal: true -*-
+#
# = net/ftp.rb - FTP Client Library
#
# Written by Shugo Maeda <shugo@ruby-lang.org>.
@@ -610,7 +612,7 @@ module Net
f = open(localfile, "w")
end
elsif !block_given?
- result = ""
+ result = String.new
end
begin
f.binmode if localfile
@@ -637,7 +639,7 @@ module Net
if localfile
f = open(localfile, "w")
elsif !block_given?
- result = ""
+ result = String.new
end
begin
retrlines("RETR #{remotefile}") do |line, newline|
@@ -1287,11 +1289,11 @@ module Net
def read(len = nil)
if len
- s = super(len, "", true)
+ s = super(len, String.new, true)
return s.empty? ? nil : s
else
result = ""
- while s = super(DEFAULT_BLOCKSIZE, "", true)
+ while s = super(DEFAULT_BLOCKSIZE, String.new, true)
break if s.empty?
result << s
end