Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

URI::FTP.new

(::String? scheme, ::String? userinfo, ::String? host, (::String | ::Integer)? port, nil registry, ::String? path, ::String? opaque, ::String? query, ::String? fragment, ?untyped parser, ?::boolish arg_check) -> ::URI::FTP
new(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = nil, arg_check = false)

Description

Creates a new URI::FTP object from generic URL components with no syntax checking.

Unlike build(), this method does not escape the path component as required by RFC1738; instead it is treated as per RFC2396.

Arguments are scheme, userinfo, host, port, registry, path, opaque, query, and fragment, in that order.

See also .build #check_typecode #path also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0