[ruby-core:76433] [Ruby trunk Feature#12419] Improve String#dump for Unicode output (from "\u{130}" to "\u0130")

From: duerst@...
Date: 2016-07-19 08:32:33 UTC
List: ruby-core #76433
Issue #12419 has been updated by Martin D端rst.

Assignee set to Hiroshi SHIBATA

----------------------------------------
Feature #12419: Improve String#dump for Unicode output (from "\u{130}" to "\u0130")
https://bugs.ruby-lang.org/issues/12419#change-59677

* Author: Martin D端rst
* Status: Open
* Priority: Normal
* Assignee: Hiroshi SHIBATA
----------------------------------------
Currently, `"聴聴聴".dump` produces `"\u{130}\u{130}\u{130}"`.

This is rather suboptimal, `"\u0130\u0130\u0130"` is shorter and easier to read.

The only time \u{} notation should be used is when more than four hex digits are needed.



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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next