Actions
Bug #223
closedNet::FTP#sendport incompatible with Mathn library
Description
=begin
The Mathn library modifies the #/ Operator to return a Rational instead of an Integer. But Net::FTP#sendport relies on getting an Integer and not a Rational value. Using #div instead of #/ for division fixes this error.
@ftp.send(:sendport, "192.168.0.1", 1234)
writes "PORT 192,168,0,1,4,210\r\n" to the socket
require "mathn"
@ftp.send(:sendport, "192.168.0.1", 1234)
writes "PORT 192,168,0,1,617/128,210\r\n" to the socket.
=end
Files
Actions
Like0
Like0