From: naruse@... Date: 2015-12-13T02:16:00+00:00 Subject: [ruby-dev:49433] [Ruby trunk - Bug #11787] rb_inspect() should check Encoding.default_internal instead of Encoding.default_external Issue #11787 has been updated by Yui NARUSE. Looks good the concept. Could you rebase and commit it? ---------------------------------------- Bug #11787: rb_inspect() should check Encoding.default_internal instead of Encoding.default_external https://bugs.ruby-lang.org/issues/11787#change-55505 * Author: Shugo Maeda * Status: Open * Priority: Normal * Assignee: Yui NARUSE * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- rb_inspect() checks Encoding.default_external even if Encoding.default_internal is specified. ``` $ cat t.rb puts "\u3042" p "\u3042" $ ruby -E windows-31j:utf-8 t.rb あ t.rb:2:in `p': inspected result must be ASCII only or use the default external encoding (Encoding::CompatibilityError) from t/t.rb:2:in `
' ``` Encoding.default_internal should be check instead. ---Files-------------------------------- 0001-object.c-rb_inspect-check-the-default-internal-encod.patch (2.78 KB) -- https://bugs.ruby-lang.org/