Sha256: afe01dcb3f7b1286e86f6b75cac19d37d43f55ead82fe1f2f1e7b4c275a6279b
Contents?: true
Size: 1.67 KB
Versions: 16
Compression:
Stored size: 1.67 KB
Contents
o:$YARD::CodeObjects::MethodObject: @name:rewind:@docstringIC:YARD::Docstring"�Positions <em>ios</em> to the beginning of input, resetting <code>lineno</code> to zero. f = File.new("testfile") f.readline #=> "This is line one\n" f.rewind #=> 0 f.lineno #=> 0 f.readline #=> "This is line one\n" :@objectu:YARD::StubProxyIO#rewind: @summary0: @all"Positions <em>ios</em> to the beginning of input, resetting <code>lineno</code> to zero. f = File.new("testfile") f.readline #=> "This is line one\n" f.rewind #=> 0 f.lineno #=> 0 f.readline #=> "This is line one\n" @overload rewind @return [0]:@ref_tags[: @tags[o:YARD::Tags::OverloadTag ; u;IO#rewind;;;IC; " ; u;IO#rewind;0; "@return [0];[;[o:YARD::Tags::Tag ; 0;0:@types["0: @text":@tag_name"return;0:@parameters[;0:@signature"rewind;" overload:@current_file_has_commentsF:@scope: instance;[:@docstring_extra0:@files[[" io.c0:@namespaceu;IO: @path"IO#rewind;[:@visibility:public:@source"p/* * call-seq: * ios.rewind => 0 * * Positions <em>ios</em> to the beginning of input, resetting * <code>lineno</code> to zero. * * f = File.new("testfile") * f.readline #=> "This is line one\n" * f.rewind #=> 0 * f.lineno #=> 0 * f.readline #=> "This is line one\n" */ static VALUE rb_io_rewind(io) VALUE io; { rb_io_t *fptr; GetOpenFile(io, fptr); if (io_seek(fptr, 0L, 0) != 0) rb_sys_fail(fptr->path); clearerr(fptr->f); if (io == current_file) { gets_lineno -= fptr->lineno; } fptr->lineno = 0; return INT2FIX(0); }:@source_type:c
Version data entries
16 entries across 16 versions & 2 rubygems