Skip to content

Commit 65a424e

Browse files
hsbtnevans
authored andcommitted
✅ Avoid endless method defs for Ruby 2.7 compatibility
The non-synchronizing literal tests from the #701 backport used endless method definitions, which require Ruby 3.0. The v0.4 line still supports Ruby 2.7.3, so this broke CI on 2.7.
1 parent 0373573 commit 65a424e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/net/imap/test_imap.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ def test_raw_data
806806
with_fake_server(
807807
with_extensions: %w[LITERAL+], greeting_capabilities: true,
808808
) do |server, imap|
809-
def imap.send_test_args(*args) = send_command("TEST", *args)
809+
def imap.send_test_args(*args) send_command("TEST", *args) end
810810
server.on "TEST", &:done_ok
811811

812812
# imap.config.max_non_synchronizing_literal = 5_000
@@ -829,7 +829,7 @@ def imap.send_test_args(*args) = send_command("TEST", *args)
829829
with_extensions: %w[LITERAL-], greeting_capabilities: true,
830830
ignore_abrupt_eof: true, ignore_io_error: true
831831
) do |server, imap|
832-
def imap.send_test_args(*args) = send_command("TEST", *args)
832+
def imap.send_test_args(*args) send_command("TEST", *args) end
833833
server.on "TEST", &:done_ok
834834
assert_raise(Net::IMAP::DataFormatError) do
835835
imap.send_test_args Net::IMAP::Literal["\xff".b * 5000, true]
@@ -843,7 +843,7 @@ def imap.send_test_args(*args) = send_command("TEST", *args)
843843
with_extensions: %w[LITERAL+], greeting_capabilities: false,
844844
ignore_abrupt_eof: true, ignore_io_error: true
845845
) do |server, imap|
846-
def imap.send_test_args(*args) = send_command("TEST", *args)
846+
def imap.send_test_args(*args) send_command("TEST", *args) end
847847
server.on "TEST", &:done_ok
848848
assert_raise(Net::IMAP::DataFormatError) do
849849
imap.send_test_args Net::IMAP::Literal["\xff".b * 100, true]

0 commit comments

Comments
 (0)