End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Net::FTP.open
open(host, *args) { |ftp| ... }
lib/net/ftp.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/net/ftp.rb, line 166
def FTP.open(host, *args)
if block_given?
ftp = new(host, *args)
begin
yield ftp
ensure
ftp.close
end
else
new(host, *args)
end
end