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-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,UNPARSEABLE_RELAY 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 5F4EE1F531 for ; Sat, 8 Aug 2020 02:31:09 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 56965120B7F; Sat, 8 Aug 2020 11:30:32 +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 54385120AD9 for ; Sat, 8 Aug 2020 11:30:30 +0900 (JST) Received: by filterdrecv-p3iad2-d8cc6d457-4rql4 with SMTP id filterdrecv-p3iad2-d8cc6d457-4rql4-20-5F2E0E5E-90 2020-08-08 02:30:54.944806496 +0000 UTC m=+807759.889524787 Received: from herokuapp.com (unknown) by ismtpd0033p1iad2.sendgrid.net (SG) with ESMTP id zaKnxy4mSXWBWUtlZh2x3Q for ; Sat, 08 Aug 2020 02:30:54.917 +0000 (UTC) Date: Sat, 08 Aug 2020 02:30:54 +0000 (UTC) From: samuel@oriontransfer.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 75339 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17107 X-Redmine-Issue-Author: 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+Wj30Te32ixsOZyxALJhNixdh?= =?us-ascii?Q?7zcie3+L54alGjriDbIwICBqUe8Oeq86Iv1kAlS?= =?us-ascii?Q?44T4cI1LvrOWYvU6g82y=2Flv2LQwB=2Fdc3VurSP1L?= =?us-ascii?Q?F6eBu3GHfKS1JO54g9m5awvbK6vCpemrh0=2FUDmF?= =?us-ascii?Q?o3WcyCug3n0EA0drA+4Ha5ds2fg1zXxANnax5NH?= =?us-ascii?Q?qU0ewwZZ2vVUdmrpY=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 99513 Subject: [ruby-core:99513] [Ruby master Bug#17107] Backtick in backtrace is a little bit annoying 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 #17107 has been reported by ioquatix (Samuel Williams). ---------------------------------------- Bug #17107: Backtick in backtrace is a little bit annoying https://bugs.ruby-lang.org/issues/17107 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- In Ruby exception backtrace (and other places), the method name uses a quoting style of a backtick followed by a text/name followed by an apostrophy. ``` in `
' ``` The quoting style is not safe, as in, it cannot be relied upon for parsing, because it's easy to inject quotes into the output stream: e.g. ~~~ irb(main):006:0> self.send(:"I'm Great") Traceback (most recent call last): 4: from /tmp/64556713-b3a1-40a1-b458-bfed3fec55b2:8:in `
' 3: from :20:in `irb' 2: from /tmp/64556713-b3a1-40a1-b458-bfed3fec55b2:5:in `
' 1: from /tmp/64556713-b3a1-40a1-b458-bfed3fec55b2:6:in `rescue in
' NoMethodError (undefined method `I'm Great' for main:Object) ~~~ Note the last line now has ambiguous quoting. - Should we fix this quoting style? - Should we remove this quoting style? - Should we choose some other quoting style? As a specific point: - Can we use two apostrophes rather than a backtick/apostrophe? Backticks often have a special meaning (e.g. markdown) which makes it somewhat annoying to copy and paste. -- https://bugs.ruby-lang.org/