instance method
OpenSSL::Buffering#ungetc
(::String c) -> ::String
ungetc(c)
ext/openssl/lib/openssl/buffering.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/ext/openssl/lib/openssl/buffering.rb, line 326
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 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0