Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
OpenSSL::Buffering#ungetc
ungetc(c)
ext/openssl/lib/openssl/buffering.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/ext/openssl/lib/openssl/buffering.rb, line 320
def ungetc(c)
@rbuffer[0,0] = c.chr
end
Pushes character c back onto the stream such that a subsequent buffered character read will return it.
Unlike IO#getc multiple bytes may be pushed back onto the stream.
Has no effect on unbuffered reads (such as sysread).
See also
#readpartial
#write
#read_nonblock
#write_nonblock
also in
4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0