summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/getbyte_spec.rb
diff options
context:
space:
mode:
authorYO4 <ysno@ac.auone-net.jp>2025-09-04 20:34:15 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2025-09-08 00:23:01 +0900
commit6cd98c24fe9aeea3829ac3d554a277f053cec0be (patch)
tree563440e6380a19d85d9a46e747da8efd91ba4cfe /spec/ruby/core/string/getbyte_spec.rb
parent85bd3fb870aca52c778cf32be424e13a1372fbf1 (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/string/getbyte_spec.rb')
0 files changed, 0 insertions, 0 deletions