Skip to content

Commit b02182c

Browse files
committed
βœ…πŸ› Fix FakeServer CommandParseError (tests only)
1 parent 94c7957 commit b02182c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

β€Žtest/net/imap/fake_server/command_reader.rbβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require "net/imap"
44

55
class Net::IMAP::FakeServer
6-
CommandParseError = RuntimeError
6+
CommandParseError = Class.new(RuntimeError)
77

88
class CommandReader
99
attr_reader :last_command
@@ -46,7 +46,7 @@ def get_command
4646
# TODO: convert bad command exception to tagged BAD response, when possible
4747
def parse(buf)
4848
/\A([^ ]+) ((?:UID )?\w+)(?: (.+))?\r\n\z/min =~ buf or
49-
raise CommandParseError, "bad request: %p" [buf]
49+
raise CommandParseError, "bad request: %p" % [buf]
5050
case $2.upcase
5151
when "LOGIN", "SELECT", "EXAMINE", "ENABLE", "AUTHENTICATE"
5252
Command.new $1, $2, scan_astrings($3), buf

0 commit comments

Comments
Β (0)