Bug #760
closedNet::FTP does not work when "mathn" is loaded.
Description
=begin
Net::FTP starts raising exceptions when "mathn" is loaded. The problem is in Net::FTP#sendport(): when "mathn" is required, "port / 256" starts resulting in Rational rather than in Integer. And "sprintf("%d", port)" results in incorrect "number/256" string (as Rational#to_s() does) rather than just "number".
=end
Updated by matz (Yukihiro Matsumoto) about 16 years ago
- Status changed from Open to Closed
=begin
It's already fixed in 1.8.7.
=end
Updated by trans (Thomas Sawyer) about 16 years ago
=begin
On Nov 17, 11:12 pm, Lavir the Whiolet redm...@ruby-lang.org wrote:
Bug #760: Net::FTP does not work when "mathn" is loaded.http://redmine.ruby-lang.org/issues/show/760
Author: Lavir the Whiolet
Status: Open, Priority: NormalNet::FTP starts raising exceptions when "mathn" is loaded. The problem is in Net::FTP#sendport(): when "mathn" is required, "port / 256" starts resulting in Rational rather than in Integer. And "sprintf("%d", port)" results in incorrect "number/256" string (as Rational#to_s() does) rather than just "number".
----------------------------------------http://redmine.ruby-lang.org
This is the first I ever heard of mathn.rb, so I looked it up and,
well I don't exactly get it.
What I see that makes sense as a separate library is Prime. And I'll
tell you what. I would never have thought to look in the totally
undocumented mathn.rb for such a thing. "prime.rb" yes, "mathn.rb"
no.
On top of this, a few of the (whole 8) extension methods, do not seem
to need Prime. Could they not just as well be in the original classes
(eg. Math#sqrt)? And are any of the other extensions (eg. Ratonal#**)
overriding the original methods in an incompatible way? If so, that
stinks. Use methods names not already used!
=end