rubinius/rubinius — pull request #1945 by ryoqun (2012-10-05 14:41:02+00:00)
Title: Add minimal encoding support to String#inspect

This is not really a pull request, rather a question. Can this kind of incomplete implementation be merged in?

If no, I'm fine.

In my daily use of Rubinius, I need this before @brixen's full encoding support comes, because I often encounter characters outside Ascii.

If yes, I'll continue to work on this.

`"a \0二\x7f\xe3\xc7\x61保護 b c".inspect`

before: `"a \x00\xE4\xBA\x8C\x7F\xE3\xC7a\xE4\xBF\x9D\xE8\xAD\xB7 b c"`

after: `"a \u0000二\u007F\xE3\xC7a保護 b c"` (same behavior with MRI 1.9 in this case)