This issue was solved with changeset r34218.
John, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
object.c (rb_inspect): raises Encoding::CompatibilityError if the
result is incompatible with the default external encoding. [ruby-core:41931] [Bug #5848]
This issue was solved with changeset r34308.
John, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
object.c (rb_inspect): raise the result is not compatible with
the default external encoding. [ruby-core:42095] [Bug #5848]
If the default external encoding is ASCII compatible, the encoding of
inspected result must be compatible with it.
If the default external encoding is ASCII incomapatible,
the result must be ASCII only.