Sha256: 61d531dad626b297ab16e788b2e0fd53e33f4e361e1f91078cc6a7c24a10c667

Contents?: true

Size: 1.96 KB

Versions: 12

Compression:

Stored size: 1.96 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:==:@docstringIC:YARD::Docstring"̃Returns <code>true</code> only if <i>obj</i> has the same value
as <i>big</i>. Contrast this with <code>Bignum#eql?</code>, which
requires <i>obj</i> to be a <code>Bignum</code>.

   68719476736 == 68719476736.0   #=> true
:@objectu:YARD::StubProxyBignum#==:
@summary0:	@all"Returns <code>true</code> only if <i>obj</i> has the same value
as <i>big</i>. Contrast this with <code>Bignum#eql?</code>, which
requires <i>obj</i> to be a <code>Bignum</code>.

   68719476736 == 68719476736.0   #=> true


@overload ==(obj)
  @return [Boolean]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Bignum#==;;;IC;	"
;
u;Bignum#==;0;
"@return [Boolean];[;[o:YARD::Tags::Tag
;
0;0:@types["Boolean:
@text":@tag_name"return;0:@parameters[[:obj0;0:@signature"==(obj);"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["
bignum.c0:@namespaceu;Bignum:
@path"Bignum#==;[:@visibility:public:@source"©/*
 *  call-seq:
 *     big == obj  => true or false
 *
 *  Returns <code>true</code> only if <i>obj</i> has the same value
 *  as <i>big</i>. Contrast this with <code>Bignum#eql?</code>, which
 *  requires <i>obj</i> to be a <code>Bignum</code>.
 *
 *     68719476736 == 68719476736.0   #=> true
 */

static VALUE
rb_big_eq(x, y)
    VALUE x, y;
{
    switch (TYPE(y)) {
      case T_FIXNUM:
    y = rb_int2big(FIX2LONG(y));
    break;
      case T_BIGNUM:
    break;
      case T_FLOAT:
        {
        volatile double a, b;

        a = RFLOAT(y)->value;
        if (isnan(a)) return Qfalse;
        b = rb_big2dbl(x);
        return (a == b)?Qtrue:Qfalse;
    }
      default:
    return rb_equal(y, x);
    }
    if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
    if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
    if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
    return Qtrue;
}:@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/Bignum/_3D_3D_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Bignum/_3D_3D_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Bignum/_3D_3D_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Bignum/_3D_3D_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Bignum/_3D_3D_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Bignum/_3D_3D_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Bignum/_3D_3D_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Bignum/_3D_3D_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Bignum/_3D_3D_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Bignum/_3D_3D_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Bignum/_3D_3D_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Bignum/_3D_3D_i.dat