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 DBE621F46C for ; Sat, 11 Jan 2020 23:45:10 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 1107412090A; Sun, 12 Jan 2020 08:44:54 +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 B7F171208D1 for ; Sun, 12 Jan 2020 08:44:52 +0900 (JST) Received: by filterdrecv-p3iad2-57f487d66-99q77 with SMTP id filterdrecv-p3iad2-57f487d66-99q77-18-5E1A5DFC-F 2020-01-11 23:45:00.296821355 +0000 UTC m=+2242701.320886769 Received: from herokuapp.com (unknown [54.224.129.129]) by ismtpd0009p1iad2.sendgrid.net (SG) with ESMTP id 6hI4WdsaQhmXgI-MKihOLQ for ; Sat, 11 Jan 2020 23:45:00.261 +0000 (UTC) Date: Sat, 11 Jan 2020 23:45:00 +0000 (UTC) From: samuel@oriontransfer.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 72458 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+Wj30RrsaoEdePQQhKzpRYz2=2F?= =?us-ascii?Q?=2FnR87kHEmaUasAxWh0ULXz2lMiJ1r4MBHJwLklJ?= =?us-ascii?Q?I9HyBqH1vjBqk595ddJ9Il8p7y3M0F=2FfJ1pjBAm?= =?us-ascii?Q?1IjSytDXW6l4nmS54cwXNNR8vQ7TReLk2g7y2=2F9?= =?us-ascii?Q?zXnc60J6neUMRSIISWm3r2N6z91aNGFxh9iUrew?= =?us-ascii?Q?lIwn0kcRQhn0vmF7g=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 96795 Subject: [ruby-core:96795] [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). Status changed from Rejected to Open On Ruby 2.7.0: ``` irb(main):020:-> x = [1, 2, ->{}]; puts(*x, &x.pop) 1 2 => nil irb(main):021:-> x = [1, 2, ->{}]; puts(*x, &x.last) 1 2 # => nil ``` This seems like buggy behaviour related to the original issue. ---------------------------------------- Bug #16500: Argument added both to splat and last &block argument https://bugs.ruby-lang.org/issues/16500#change-83788 * Author: anatolik (Anatol Pomozov) * Status: Open * 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/