Sha256: 810c27918315fdcae1ad7dfa492619eba39b967bd49ff3255fd00872a44f30a4

Contents?: true

Size: 1.96 KB

Versions: 12

Compression:

Stored size: 1.96 KB

Contents

o:$YARD::CodeObjects::MethodObject:@scope:
instance:@visibility:public:
@pathI"IO#putc:EF:@parameters[:@files[[I"	io.c;T0:@current_file_has_commentsF:
@name:	putc:@source_type:c:
@tags[:@docstringIC:YARD::Docstring"kIf <i>obj</i> is <code>Numeric</code>, write the character whose code is
the least-significant byte of <i>obj</i>, otherwise write the first byte
of the string representation of <i>obj</i> to <em>ios</em>. Note: This
method is not safe for use with multi-byte characters as it will truncate
them.

   $stdout.putc "A"
   $stdout.putc 65

<em>produces:</em>

   AA;F:@objectIu:YARD::StubProxyIO#putc;F:
@summary0:@ref_tags[;[o:YARD::Tags::OverloadTag
:@tag_nameI"
overload;F:
@text0;;:@types0:@signatureI"putc(obj);F;IC;";F;Iu;IO#putc;F;0;[;[o:YARD::Tags::Tag
;I"return;F;I";F;0;[I"Object;F;0:	@allI"@return [Object];F;[[:obj0;Iu;IO#putc;F; I"”If <i>obj</i> is <code>Numeric</code>, write the character whose code is
the least-significant byte of <i>obj</i>, otherwise write the first byte
of the string representation of <i>obj</i> to <em>ios</em>. Note: This
method is not safe for use with multi-byte characters as it will truncate
them.

   $stdout.putc "A"
   $stdout.putc 65

<em>produces:</em>

   AA


@overload putc(obj)
  @return [Object];F:@namespaceIu;IO;F:@docstring_extra0:@sourceI"O/*
 *  call-seq:
 *     ios.putc(obj)    -> obj
 *
 *  If <i>obj</i> is <code>Numeric</code>, write the character whose code is
 *  the least-significant byte of <i>obj</i>, otherwise write the first byte
 *  of the string representation of <i>obj</i> to <em>ios</em>. Note: This
 *  method is not safe for use with multi-byte characters as it will truncate
 *  them.
 *
 *     $stdout.putc "A"
 *     $stdout.putc 65
 *
 *  <em>produces:</em>
 *
 *     AA
 */

static VALUE
rb_io_putc(VALUE io, VALUE ch)
{
    char c = NUM2CHR(ch);

    rb_io_write(io, rb_str_new(&c, 1));
    return ch;
};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/putc_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_19/objects/IO/putc_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_19/objects/IO/putc_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_19/objects/IO/putc_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_19/objects/IO/putc_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_19/objects/IO/putc_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_19/objects/IO/putc_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_19/objects/IO/putc_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_19/objects/IO/putc_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_19/objects/IO/putc_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_19/objects/IO/putc_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_19/objects/IO/putc_i.dat