From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 366091F885 for ; Sat, 11 Jan 2020 01:28:25 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 99777120AA2; Sat, 11 Jan 2020 10:28:11 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 20C8B120A9C for ; Sat, 11 Jan 2020 10:28:08 +0900 (JST) Received: by filterdrecv-p3iad2-57f487d66-whbch with SMTP id filterdrecv-p3iad2-57f487d66-whbch-18-5E1924A9-4B 2020-01-11 01:28:09.778530657 +0000 UTC m=+2162492.742489936 Received: from herokuapp.com (unknown [54.166.107.205]) by ismtpd0052p1iad1.sendgrid.net (SG) with ESMTP id FyC9IHodRrmQ2D-2uNilLQ for ; Sat, 11 Jan 2020 01:28:09.699 +0000 (UTC) Date: Sat, 11 Jan 2020 01:28:09 +0000 (UTC) From: samuel@oriontransfer.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 72436 X-Redmine-Project: ruby-master X-Redmine-Issue-Id: 16500 X-Redmine-Issue-Author: anatolik X-Redmine-Issue-Assignee: ioquatix X-Redmine-Sender: ioquatix X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?cjxb6GWHefMLoR50bkJBcGo6DRiDl=2FNYcMZdY+Wj30QcUabzefO7PQ0z5V7jnA?= =?us-ascii?Q?TlALjmsWNJd8w9x4x9es9pXSSpCtonbNBUD78Gw?= =?us-ascii?Q?FJDE6DLYPmV1meXhlwYys020ysCN2724r6Wxb6G?= =?us-ascii?Q?vGhQ0q=2FBjCU3dtsP=2FyDtn8XVnHF+7=2FhTDKhYxdI?= =?us-ascii?Q?yfwDnf8xFhAGUYPPnY4AZALBV7Ary0Sbzp+wHZI?= =?us-ascii?Q?12Xtr5vFYfhX91afg=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 96773 Subject: [ruby-core:96773] [Ruby master Bug#16500] Argument added both to splat and last &block argument X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #16500 has been updated by ioquatix (Samuel Williams). Assignee set to ioquatix (Samuel Williams) Status changed from Open to Rejected https://github.com/ruby-grape/grape/issues/1967 ---------------------------------------- Bug #16500: Argument added both to splat and last &block argument https://bugs.ruby-lang.org/issues/16500#change-83767 * Author: anatolik (Anatol Pomozov) * Status: Rejected * Priority: Normal * Assignee: ioquatix (Samuel Williams) * Target version: * ruby -v: 2.7.0 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- Here is a followup for a ruby2.7 issue discussed here https://gitlab.com/groups/gitlab-org/-/epics/2380 I run gitlab with ruby2.7. Things work mostly fine except one weird issue. gitlab/lib/api/api_guard.rb calls Rack's `use` method: ```ruby use Rack::OAuth2::Server::Resource::Bearer, 'The API' do |request| # The authenticator only fetches the raw token string # Must yield access token to store it in the env request.access_token end ``` The `use` method looks like ```ruby def use(middleware, *args, &block) if @map mapping, @map = @map, nil @use << proc { |app| generate_map app, mapping } end @use << proc { |app| middleware.new(app, *args, &block) } end ``` For some reason `Proc` method set to `&block` *and* added to `args`. It sounds wrong. `Proc` should be set to `&block` only and `args` should contain only 1 argument. -- https://bugs.ruby-lang.org/