General

Profile

javanthropus (Jeremy Bopp)

  • Login: javanthropus
  • Email: jeremy@bopp.net
  • Registered on: 06/25/2009
  • Last sign in: 11/12/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 4 9 13

Activity

11/15/2025

06:39 PM Ruby Bug #21686: In combination with IO#ungetbyte, the write position may become unpredictable.
#20919 may be related. If the PR for this issue is accepted, it likely determines how that issue should be addressed. There's already a PR that is several months old associated with it. javanthropus (Jeremy Bopp)

11/12/2025

03:27 PM Ruby Bug #21682: The result of IO#pos is inconsistent after using IO#ungetc.
I think this is related to or maybe the same as #20889. javanthropus (Jeremy Bopp)

06/07/2025

08:39 PM Ruby Feature #20105: Introduce `IO::Stream` or something similar.
I'm not sure if it meets your needs, but I just released an update to the [io-like gem](https://rubygems.org/gems/io-like) that brings it into the Ruby 3.x age. It uses primitive IO functions as a base and implements virtually all of th... javanthropus (Jeremy Bopp)

11/29/2024

04:35 PM Ruby Bug #20924: IO#readline ignores the limit argument when the encoding is UTF-32LE and the limit would split a character
Note that replacing `#readline` with `#gets` in the examples causes the issue to be seen in all Ruby versions, including 3.3.6. javanthropus (Jeremy Bopp)
04:07 PM Ruby Bug #20924 (Closed): IO#readline ignores the limit argument when the encoding is UTF-32LE and the limit would split a character
```ruby
require 'tempfile'
Tempfile.open(binmode: true, encoding: 'utf-32le') do |f|
f.write('0123456789')
f.rewind
# A limit that would truncate a character becomes completely ignored
f.readline(3).bytesize # => 40; s...
javanthropus (Jeremy Bopp)

11/28/2024

01:45 PM Ruby Bug #20869: IO buffer handling is inconsistent when seeking
@nobu, I just checked with a fresh build of the master branch, and the second failure case I mentioned in my previous message still exists. I opened #20919 to cover it. javanthropus (Jeremy Bopp)
01:45 PM Ruby Bug #20919 (Open): IO#seek and IO#pos= do not clear the character buffer in some cases while transcoding
When transcoding characters, `IO#seek` and `IO#pos=` only clear the internal character buffer if `IO#getc` is called first:
```ruby
require 'tempfile'
Tempfile.open(encoding: 'utf-8:utf-16le') do |f|
f.write('0123456789')
f....
javanthropus (Jeremy Bopp)

11/12/2024

02:33 PM Ruby Bug #20869: IO buffer handling is inconsistent when seeking
I found another issue while looking for more sharp edges on this, and I've opened #20889 as a result. javanthropus (Jeremy Bopp)
02:32 PM Ruby Bug #20889 (Open): IO#ungetc and IO#ungetbyte should not cause IO#pos to report an inaccurate position
```ruby
require 'tempfile'
Tempfile.open(encoding: 'utf-8') do |f|
f.write('0123456789')
f.rewind
f.ungetbyte(93)
f.pos # => -1; negative value is surprising!
end
Tempfile.open(encoding: 'utf-8') do |f|
f.wri...
javanthropus (Jeremy Bopp)

11/08/2024

01:16 PM Ruby Bug #20869: IO buffer handling is inconsistent when seeking
> Since io.pos (not assignment) looks mere attribute, differentiated from seek.
If not for the fact that `IO#seek` always returns 0 regardless of its arguments (something I've never understood), `IO#pos` could be implemented as `IO#se...
javanthropus (Jeremy Bopp)

Also available in: Atom