Project

General

Profile

Actions

Bug #14750

closed

[IMAP] `send_string_data` uses `send_literal` method with incorrect number of arguments

Added by ShockwaveNN (Pavel Lobashov) almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
[ruby-core:86990]

Description

Hi there, sorry I haven't reliable test case to reproduce an issue, since I don't have access to any public IMAP servers.

In Ruby 2.5 in file lib/net/imap.rb there is method def send_string_data which looks like

def send_string_data(str)
  ...
  send_literal(str)
  ...
end

See https://github.com/ruby/ruby/blob/ruby_2_5/lib/net/imap.rb#L1346

But method send_literal defined as

def send_literal(str, tag)

See https://github.com/ruby/ruby/blob/ruby_2_5/lib/net/imap.rb#L1359

Second argumen, tag is not optional, so send_string_data fail with wrong number of arguments (given 1, expected 2) error

This was introduced https://github.com/ruby/ruby/commit/84c1596342854208c45832ed9700482dd28efbfc
Some places was changed for new two argument syntax, but send_literal in send_string_data was forgontten

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0