Method: OpenSSL::Buffering#ungetc

Defined in:
lib/openssl/buffering.rb

#ungetc(c) ⇒ Object

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).



323
324
325
# File 'lib/openssl/buffering.rb', line 323

def ungetc(c)
  @rbuffer[0,0] = c.chr
end