Sha256: b8090c271a818e9f0873c1591734eab967fd6879a360eb788abc470a147941c7

Contents?: true

Size: 1.32 KB

Versions: 12

Compression:

Stored size: 1.32 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:+:@docstringIC:YARD::Docstring"…Performs addition: the class of the resulting object depends on
the class of <code>numeric</code> and on the magnitude of the
result.
:@objectu:YARD::StubProxy
Fixnum#+:
@summary0:	@all"œPerforms addition: the class of the resulting object depends on
the class of <code>numeric</code> and on the magnitude of the
result.


@overload +(numeric):@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;
Fixnum#+;;;IC;	"
;
u;
Fixnum#+;0;
";[;[:@types0:@parameters[[:numeric0:
@text0:@signature"+(numeric):@tag_name"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["numeric.c0:@namespaceu;Fixnum:
@path"
Fixnum#+;[:@visibility:public:@source"!/*
 * call-seq:
 *   fix + numeric   =>  numeric_result
 *
 * Performs addition: the class of the resulting object depends on
 * the class of <code>numeric</code> and on the magnitude of the
 * result.
 */

static VALUE
fix_plus(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
    long a, b, c;
    VALUE r;

    a = FIX2LONG(x);
    b = FIX2LONG(y);
    c = a + b;
    r = LONG2NUM(c);

    return r;
    }
    if (TYPE(y) == T_FLOAT) {
    return rb_float_new((double)FIX2LONG(x) + RFLOAT(y)->value);
    }
    return rb_num_coerce_bin(x, y);
}:@source_type:c

Version data entries

12 entries across 12 versions & 2 rubygems

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