diff --git a/lib/net/imap.rb b/lib/net/imap.rb index c40400b7..07e5a317 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -3253,6 +3253,10 @@ def search_args(keys, charset_arg = nil, return: nil, charset: nil) esearch = false in [_, Array[RETURN_WHOLE, _, *] | RETURN_START] raise ArgumentError, "conflicting return options" + in [_, Array[RETURN_WHOLE, _, *]] # workaround for https://bugs.ruby-lang.org/issues/20956 + raise ArgumentError, "conflicting return options" + in [_, RETURN_START] # workaround for https://bugs.ruby-lang.org/issues/20956 + raise ArgumentError, "conflicting return options" in [return_opts, keys] return_opts = convert_return_opts(return_opts) esearch = true