ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: mame@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:91207] [Ruby trunk Bug#11116] The spec of String#dump
Date: Mon, 21 Jan 2019 08:52:21 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-76444.20190121085219.32b327535689814e@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11116.20150503103632@ruby-lang.org

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
    <code>\nnn</code> 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 <mame@ruby-lang.org>



-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2019-01-21  8:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-11116.20150503103632@ruby-lang.org>
2015-05-03 10:36 ` [ruby-core:69063] [Ruby trunk - Bug #11116] [Open] The spec of String#dump mame
2019-01-21  8:52 ` mame [this message]
2019-01-21 10:54 ` [ruby-core:91210] [Ruby trunk Bug#11116] " eregontp
2019-01-21 13:20 ` [ruby-core:91212] " mame

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-76444.20190121085219.32b327535689814e@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).