summaryrefslogtreecommitdiff
path: root/lib/net
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/ftp.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
index 88d070f9a3..879206c7dd 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -615,15 +615,15 @@ module Net
result = String.new
end
begin
- f.?binmode
+ f&.binmode
retrbinary("RETR #{remotefile}", blocksize, rest_offset) do |data|
- f.?write(data)
- block.?(data)
- result.?concat(data)
+ f&.write(data)
+ block&.(data)
+ result&.concat(data)
end
return result
ensure
- f.?close
+ f&.close
end
end
@@ -646,13 +646,13 @@ module Net
begin
retrlines("RETR #{remotefile}") do |line, newline|
l = newline ? line + "\n" : line
- f.?print(l)
- block.?(line, newline)
- result.?concat(l)
+ f&.print(l)
+ block&.(line, newline)
+ result&.concat(l)
end
return result
ensure
- f.?close
+ f&.close
end
end