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.5 required=3.0 tests=AWL,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,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 768CB1F453 for ; Mon, 21 Jan 2019 08:52:28 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 59226121ED0; Mon, 21 Jan 2019 17:52:26 +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 4ABE2121EC9 for ; Mon, 21 Jan 2019 17:52:23 +0900 (JST) Received: by filter0059p3mdw1.sendgrid.net with SMTP id filter0059p3mdw1-13070-5C458843-38 2019-01-21 08:52:19.918072395 +0000 UTC m=+542836.595684900 Received: from herokuapp.com (ec2-54-205-253-189.compute-1.amazonaws.com [54.205.253.189]) by ismtpd0053p1mdw1.sendgrid.net (SG) with ESMTP id q9jA6ZBCRBOKA8fvKdrFdg for ; Mon, 21 Jan 2019 08:52:19.852 +0000 (UTC) Date: Mon, 21 Jan 2019 08:52:21 +0000 (UTC) From: mame@ruby-lang.org To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 66655 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11116 X-Redmine-Issue-Author: mame X-Redmine-Issue-Assignee: mame X-Redmine-Sender: mame 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: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6UzJRcEIrCPsGMi3Io7m0i5oAiDnWqt+e0DZ XSp4VeN7BzKega8zIcGR20kzdifP7y2euHaBJSN02j6L3m4eyyBf9xU8HsT2MTPTJNXMxSqgB1fqcf PLf5hTjuRdxFszeCYK5aG7CYJoaYdjt/6nxW4NcEGQch1UYqqxun6acGbA== X-ML-Name: ruby-core X-Mail-Count: 91207 Subject: [ruby-core:91207] [Ruby trunk Bug#11116] The spec of String#dump 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 #11116 has been updated by mame (Yusuke Endoh). Status changed from Open to Closed Committed at r66894. Closing ---------------------------------------- Bug #11116: The spec of String#dump https://bugs.ruby-lang.org/issues/11116#change-76444 * Author: mame (Yusuke Endoh) * Status: Closed * Priority: Normal * Assignee: mame (Yusuke Endoh) * Target version: * ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- The current spec says: call-seq: str.dump -> new_str Produces a version of +str+ with all non-printing characters replaced by \nnn notation and all special characters escaped. "hello \n ''".dump #=> "\"hello \\n ''\" `\nnn` must be `\xnn` now. In addition, I've expected String#dump to return a string that evaluates to an original string (except singleton methods, object id, etc.) when `eval`ed. Is this a right expectation? If so, it would be good to officially include the mention in the spec. What do you think? -- Yusuke Endoh -- https://bugs.ruby-lang.org/