Bug #14750
closed[IMAP] `send_string_data` uses `send_literal` method with incorrect number of arguments
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
Updated by shevegen (Robert A. Heiler) about 6 years ago
You are right, it seems indeed as if it was forgotten, as seen by:
Updated by shugo (Shugo Maeda) about 6 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r63396.
net/imap: Fix ArgumentError in send_string_data
Thanks to ShockwaveNN (Pavel Lobashov) for reporting the bug.
[ruby-core:86990] [Bug #14750]
Updated by ShockwaveNN (Pavel Lobashov) about 6 years ago
shugo (Shugo Maeda) wrote:
Applied in changeset trunk|r63396.
net/imap: Fix ArgumentError in send_string_data
Thanks to ShockwaveNN (Pavel Lobashov) for reporting the bug.
[ruby-core:86990] [Bug #14750]
Thanks for quick fix, I monkeypatched my code using your fix and working as intended.
Does this fix will be included in next bugfix of 2.5? Or it will be included only in 2.6?
Updated by shugo (Shugo Maeda) about 6 years ago
- Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: DONTNEED, 2.4: DONTNEED, 2.5: REQUIRED
ShockwaveNN (Pavel Lobashov) wrote:
Thanks for quick fix, I monkeypatched my code using your fix and working as intended.
Does this fix will be included in next bugfix of 2.5? Or it will be included only in 2.6?
I think the fix should be backported to 2.5.
Updated by nagachika (Tomoyuki Chikanaga) almost 6 years ago
- Backport changed from 2.3: DONTNEED, 2.4: DONTNEED, 2.5: REQUIRED to 2.3: DONTNEED, 2.4: DONTNEED, 2.5: DONE
ruby_2_5 r64420 merged revision(s) 63396.