ruby / stringio

Pseudo `IO` class from/to `String`.
BSD 2-Clause "Simplified" License
36 stars 26 forks source link

Raise an error if encoding conversion not succeeded #15

Closed nobu closed 4 years ago

nobu commented 4 years ago

As rb_str_conv_enc() returns the argument string object itself unchanged when any conversion failed, check the incompatibility in that case.

Fixes https://github.com/ruby/stringio/issues/13