Sha256: dfbe3874024689ce1ee31ea2714ceb4d4e641c2e14bc615476dfb2a445a7d446

Contents?: true

Size: 1.85 KB

Versions: 12

Compression:

Stored size: 1.85 KB

Contents

o:$YARD::CodeObjects::MethodObject:@scope:
instance:@visibility:public:
@pathI"IO#getbyte:EF:@parameters[:@files[[I"	io.c;T0:@current_file_has_commentsF:
@name:getbyte:@source_type:c:
@tags[:@docstringIC:YARD::Docstring"±Gets the next 8-bit byte (0..255) from <em>ios</em>. Returns
<code>nil</code> if called at end of file.

   f = File.new("testfile")
   f.getbyte   #=> 84
   f.getbyte   #=> 104;F:@objectIu:YARD::StubProxyIO#getbyte;F:
@summary0:@ref_tags[;[o:YARD::Tags::OverloadTag
:@tag_nameI"
overload;F:
@text0;;:@types0:@signatureI"getbyte;F;IC;";F;Iu;IO#getbyte;F;0;[;[o:YARD::Tags::Tag
;I"return;F;I";F;0;[I"Fixnum;FI"nil;F;0:	@allI"@return [Fixnum, nil];F;[;Iu;IO#getbyte;F; I"ĘGets the next 8-bit byte (0..255) from <em>ios</em>. Returns
<code>nil</code> if called at end of file.

   f = File.new("testfile")
   f.getbyte   #=> 84
   f.getbyte   #=> 104


@overload getbyte
  @return [Fixnum, nil];F:@namespaceIu;IO;F:@docstring_extra0:@sourceI"9/*
 *  call-seq:
 *     ios.getbyte   -> fixnum or nil
 *
 *  Gets the next 8-bit byte (0..255) from <em>ios</em>. Returns
 *  <code>nil</code> if called at end of file.
 *
 *     f = File.new("testfile")
 *     f.getbyte   #=> 84
 *     f.getbyte   #=> 104
 */

VALUE
rb_io_getbyte(VALUE io)
{
    rb_io_t *fptr;
    int c;

    GetOpenFile(io, fptr);
    rb_io_check_byte_readable(fptr);
    READ_CHECK(fptr);
    if (fptr->fd == 0 && (fptr->mode & FMODE_TTY) && TYPE(rb_stdout) == T_FILE) {
        rb_io_t *ofp;
        GetOpenFile(rb_stdout, ofp);
        if (ofp->mode & FMODE_TTY) {
            rb_io_flush(rb_stdout);
        }
    }
    if (io_fillbuf(fptr) < 0) {
    return Qnil;
    }
    fptr->rbuf_off++;
    fptr->rbuf_len--;
    c = (unsigned char)fptr->rbuf[fptr->rbuf_off-1];
    return INT2FIX(c & 0xff);
};F

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_19/objects/IO/getbyte_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_19/objects/IO/getbyte_i.dat