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.6 required=3.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,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 CD4E21F461 for ; Tue, 20 Aug 2019 14:27:00 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 97102120AB0; Tue, 20 Aug 2019 23:26:51 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id F0D95120A9D for ; Tue, 20 Aug 2019 23:26:46 +0900 (JST) Received: by filter0010p3iad2.sendgrid.net with SMTP id filter0010p3iad2-9613-5D5C0328-2C 2019-08-20 14:26:48.442074785 +0000 UTC m=+395044.564716694 Received: from herokuapp.com (unknown [3.95.182.116]) by ismtpd0015p1iad1.sendgrid.net (SG) with ESMTP id IIPoJ8s_Q2CLQNai_oeaVA for ; Tue, 20 Aug 2019 14:26:48.385 +0000 (UTC) Date: Tue, 20 Aug 2019 14:26:48 +0000 (UTC) From: michael.telford@live.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 69994 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 16111 X-Redmine-Issue-Author: mtelford X-Redmine-Sender: mtelford 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?y2wFp=2F5jVeTvVK+0ADTnlsa18EB+zwLzFYjL0E6oFkTul3DHjfLRLx74Fp6rCs?= =?us-ascii?Q?r1sJWQKLXCKdvpz0Gtk2SmR8FOw2xSuPoVikFWo?= =?us-ascii?Q?jjut=2Fo+=2F+TUQhcsD5NR8GUBv+zFdOHtaqshGyuU?= =?us-ascii?Q?q=2FSFX1GyCvdrKLPQWxjW6vLM6OaXHCLs5CLJI12?= =?us-ascii?Q?XgTnEg2BvZ=2FGoLnzXwf3iZAQ3vbDWQgqaVA=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 94446 Subject: [ruby-core:94446] [Ruby master Bug#16111] Combining default positional and keyword arguments is resulting in a `to_hash` method call 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 #16111 has been updated by mtelford (Michael Telford). Ok, the situation with keyword parameters is now making more sense, despite not being ideal. Since ruby 3 should implement a fix (backwards compatible or not) I am happy for this issue to be closed. Thanks to those who commented to bring me up to speed :-) ---------------------------------------- Bug #16111: Combining default positional and keyword arguments is resulting in a `to_hash` method call https://bugs.ruby-lang.org/issues/16111#change-80872 * Author: mtelford (Michael Telford) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.6.3 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- Combining default positional and keyword arguments is resulting in a `to_hash` method call when I don't believe it should be. It's affecting some code I am writing. The full details of the behaviour I'm describing can be seen in the attached script. I would like to know why the method `to_hash` is being called (only in certain circumstances) and if this is a bug to be fixed or desired behaviour (and why?). Thank in advance! ---Files-------------------------------- ruby-bug.rb (1.44 KB) -- https://bugs.ruby-lang.org/