This issue was solved with changeset r33182.
art , thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
lib/net/imap.rb (default_port, default_imap_port,
default_tls_port, default_ssl_port, default_imaps_port):
added methods for consistency with Net::POP.
based on the patch by art lussos. [ruby-core:38997] [Bug #5198]