Sha256: 0e82d7b24399344f487bdda8485b0100120372f45b2d99cc1c56d78896877299

Contents?: true

Size: 1.5 KB

Versions: 12

Compression:

Stored size: 1.5 KB

Contents

o:$YARD::CodeObjects::MethodObject:@scope:
instance:@visibility:public:
@pathI"
Fixnum#-:EF:@parameters[:@files[[I"numeric.c;T0:@current_file_has_commentsF:
@name:-:@source_type:c:
@tags[:@docstringIC:YARD::Docstring"Performs subtraction: the class of the resulting object depends on
the class of <code>numeric</code> and on the magnitude of the
result.;F:@objectIu:YARD::StubProxy
Fixnum#-;F:
@summary0:@ref_tags[;[o:YARD::Tags::OverloadTag
:@tag_nameI"
overload;F:
@text0;;:@types0:@signatureI"-(numeric);F;IC;";F;Iu;
Fixnum#-;F;0;[;[:	@allI";F;[[:numeric0;Iu;
Fixnum#-;F;I"Performs subtraction: the class of the resulting object depends on
the class of <code>numeric</code> and on the magnitude of the
result.


@overload -(numeric);F:@namespaceIu;Fixnum;F:@docstring_extra0:@sourceI"/*
 * call-seq:
 *   fix - numeric  ->  numeric_result
 *
 * Performs subtraction: the class of the resulting object depends on
 * the class of <code>numeric</code> and on the magnitude of the
 * result.
 */

static VALUE
fix_minus(VALUE x, VALUE 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;
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
    x = rb_int2big(FIX2LONG(x));
    return rb_big_minus(x, y);
      case T_FLOAT:
    return DBL2NUM((double)FIX2LONG(x) - RFLOAT_VALUE(y));
      default:
    return rb_num_coerce_bin(x, y, '-');
    }
};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/Fixnum/-_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_19/objects/Fixnum/-_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_19/objects/Fixnum/-_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_19/objects/Fixnum/-_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_19/objects/Fixnum/-_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_19/objects/Fixnum/-_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_19/objects/Fixnum/-_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_19/objects/Fixnum/-_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_19/objects/Fixnum/-_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_19/objects/Fixnum/-_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_19/objects/Fixnum/-_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_19/objects/Fixnum/-_i.dat