How to change default port in Net/FTP

When I use or it always assume that I want
to use port 21 by default. Is there a way to modify this? Like, does it
exist a variable in the FTP class that I can modify in real time?

(I don't want to use the "connect" function in the library)

Net::FTP uses the port defined in the FTP_PORT constant. Changing that should allow you to connect to a different port.

Best regards

Peter De Berdt

Peter De Berdt wrote:

The Ruby FTP library should really have an optional setter for
specifying a non-standard port to use.

??? Have you even read the docs?
Search for "port"... :-/