Actions
Defect #41737
closedDeprecation warning for IMAP4 email receiving: "Call Net::IMAP.new with keyword options"
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
I use imap_receive and get:
/opt/redmine-6.0.1/lib/redmine/imap.rb:32: warning: DEPRECATED: Call Net::IMAP.new with keyword options
      
      Updated by Go MAEDA 12 months ago
      
    
    - Category set to Email receiving
 - Target version set to 6.0.2
 
The following change will fix the warning.
I am setting the target version to 6.0.2.
Index: lib/redmine/imap.rb
===================================================================
--- lib/redmine/imap.rb    (リビジョン 23266)
+++ lib/redmine/imap.rb    (作業コピー)
@@ -29,7 +29,7 @@
         starttls = !imap_options[:starttls].nil?
         folder = imap_options[:folder] || 'INBOX'
-        imap = Net::IMAP.new(host, port, ssl)
+        imap = Net::IMAP.new(host, port: port, ssl: ssl)
         if starttls
           imap.starttls
         end
Actions