ruby/ext/stringio
Jean byroot Boussier 75154dec73 [ruby/stringio] strio_read: preserve buffer encoding on partial
reads
(https://github.com/ruby/stringio/pull/95)

[[Bug #20418]](https://bugs.ruby-lang.org/issues/20418)

Ruby IO#read preserves the encoding on partial read, but change it when
reading the whole IO

from commit https://github.com/ruby/ruby/commit/0ca7036682da:
> * io.c (read_all): should associate default external encoding.
> * io.c (io_read): should NOT associate default external encoding.

https://github.com/ruby/stringio/commit/073172da31

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2024-04-17 01:29:18 +00:00
..
.document [ruby/stringio] [DOC] Add rdoc task 2024-03-14 04:30:27 +00:00
README.md ext/stringio/README.md: update [ci skip] 2016-06-08 07:47:39 +00:00
depend Update the depend files 2023-02-28 09:09:00 -08:00
extconf.rb [ruby/stringio] Do not compile the C extension on TruffleRuby 2023-11-27 12:21:24 +00:00
stringio.c [ruby/stringio] strio_read: preserve buffer encoding on partial 2024-04-17 01:29:18 +00:00
stringio.gemspec [ruby/stringio] [DOC] Package rdoc files 2024-03-14 04:30:28 +00:00

README.md

StringIO

Pseudo IO class from/to String.

This library is based on MoonWolf version written in Ruby. Thanks a lot.

Differences to IO

  • fileno raises NotImplementedError.
  • encoding conversion is not implemented, and ignored silently.