From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5C07825E04 for ; Fri, 26 Jul 2019 18:17:33 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cb4dEn4mBLCA for ; Fri, 26 Jul 2019 18:17:33 -0400 (EDT) Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 19DE825DFE for ; Fri, 26 Jul 2019 18:17:32 -0400 (EDT) Received: by mail-lf1-f68.google.com with SMTP id c9so38037345lfh.4 for ; Fri, 26 Jul 2019 15:17:32 -0700 (PDT) From: Cyrill Gorcunov Subject: [tarantool-patches] [PATCH 1/3] box/console: Don't allow arguments in get_default_output Date: Sat, 27 Jul 2019 01:17:10 +0300 Message-Id: <20190726221712.11191-2-gorcunov@gmail.com> In-Reply-To: <20190726221712.11191-1-gorcunov@gmail.com> References: <20190726221712.11191-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tml Cc: Alexander Turenko , Konstantin Osipov , Cyrill Gorcunov The function | require('console').get_default_output() requires no arguments. Make it explcicit and print an error otherwise. Part-of #3834 --- src/box/lua/console.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua index d4f61865c..9258e7bbb 100644 --- a/src/box/lua/console.lua +++ b/src/box/lua/console.lua @@ -115,7 +115,11 @@ local function set_default_output(value) default_output_format["opts"] = opts end -local function get_default_output() +local function get_default_output(...) + local args = ... + if args ~= nil then + error("Arguments provided while prohibited") + end return default_output_format end -- 2.20.1