Sha256: 01274c76a03bf6765e6ee823766437d84355098b34c2af25c01d6ea974eaf63b

Contents?: true

Size: 1.66 KB

Versions: 16

Compression:

Stored size: 1.66 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:getbyte:@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.getc   #=> 84
   f.getc   #=> 104
:@objectu:YARD::StubProxyIO#getbyte:
@summary0:	@all"Ô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.getc   #=> 84
   f.getc   #=> 104


@overload getc
  @return [Fixnum, nil]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;IO#getbyte;:	getc;IC;	"
;
u;IO#getbyte;0;
"@return [Fixnum, nil];[;[o:YARD::Tags::Tag
;
0;0:@types["Fixnum"nil:
@text":@tag_name"return;0:@parameters[;0:@signature"	getc;"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["	io.c0:@namespaceu;IO:
@path"IO#getbyte;[:@visibility:public:@source"Ú/*
 *  call-seq:
 *     ios.getc   => 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.getc   #=> 84
 *     f.getc   #=> 104
 */

VALUE
rb_io_getc(io)
    VALUE io;
{
    rb_io_t *fptr;
    FILE *f;
    int c;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    f = fptr->f;

  retry:
    READ_CHECK(f);
    clearerr(f);
    TRAP_BEG;
    c = getc(f);
    TRAP_END;

    if (c == EOF) {
    if (ferror(f)) {
        clearerr(f);
        if (!rb_io_wait_readable(fileno(f)))
        rb_sys_fail(fptr->path);
        goto retry;
    }
    return Qnil;
    }
    return INT2FIX(c & 0xff);
}:@source_type:c

Version data entries

16 entries across 16 versions & 2 rubygems

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