ruby / stringio

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

strio_read: preserve buffer encoding on partial reads #95

Closed casperisfine closed 6 months ago

casperisfine commented 7 months ago

[Bug #20418]

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

from commit ruby/ruby@0ca7036682dad1caea4e7a4fe8fd908d94c878e8:

  • io.c (read_all): should associate default external encoding.
  • io.c (io_read): should NOT associate default external encoding.

cc @nobu