diff options
| author | YO4 <ysno@ac.auone-net.jp> | 2025-09-04 20:34:15 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2025-09-08 00:23:01 +0900 |
| commit | 6cd98c24fe9aeea3829ac3d554a277f053cec0be (patch) | |
| tree | 563440e6380a19d85d9a46e747da8efd91ba4cfe /spec/ruby/core/sizedqueue | |
| parent | 85bd3fb870aca52c778cf32be424e13a1372fbf1 (diff) | |
Allow IO#each_codepoint to work with unetc even when encoding conversion active
Using IO#each_codepoint together with IO#ungetc causes an unwanted exception when encoding conversion is active.
C:\>ruby -e "open('NUL', 'rt') { |f| f.ungetc('aa'); f.each_codepoint { |c| p c }}"
97
-e:1:in 'IO#each_codepoint': byte oriented read for character buffered IO (IOError)
from -e:1:in 'block in <main>'
from -e:1:in 'Kernel#open'
from -e:1:in '<main>'
Fixes [Bug #21131]
Diffstat (limited to 'spec/ruby/core/sizedqueue')
0 files changed, 0 insertions, 0 deletions
