Sha256: 6e9517db6a3d61f14fde88b3fef05d6fdf36c1ed9c556ed1718827e84c103c77

Contents?: true

Size: 1.31 KB

Versions: 12

Compression:

Stored size: 1.31 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:	eql?:@docstringIC:YARD::Docstring"¤code-seq:
  struct.eql?(other)   => true or false

Two structures are equal if they are the same object, or if all their
fields are equal (using <code>eql?</code>).
:@objectu:YARD::StubProxyStruct#eql?:
@summary0:	@all"¥code-seq:
  struct.eql?(other)   => true or false

Two structures are equal if they are the same object, or if all their
fields are equal (using <code>eql?</code>).
:@ref_tags[:
@tags[:@current_file_has_commentsF:@scope:
instance:@parameters[:@docstring_extra0:@files[["
struct.c0:@namespaceu;Struct:
@path"Struct#eql?;[:@visibility:public:@source"‚/*
 * code-seq:
 *   struct.eql?(other)   => true or false
 *
 * Two structures are equal if they are the same object, or if all their
 * fields are equal (using <code>eql?</code>).
 */

static VALUE
rb_struct_eql(s, s2)
    VALUE s, s2;
{
    long i;

    if (s == s2) return Qtrue;
    if (TYPE(s2) != T_STRUCT) return Qfalse;
    if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
    if (RSTRUCT(s)->len != RSTRUCT(s2)->len) {
    rb_bug("inconsistent struct"); /* should never happen */
    }

    for (i=0; i<RSTRUCT(s)->len; i++) {
    if (!rb_eql(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) 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/Struct/eql_3F_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Struct/eql_3F_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Struct/eql_3F_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Struct/eql_3F_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Struct/eql_3F_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Struct/eql_3F_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Struct/eql_3F_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Struct/eql_3F_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Struct/eql_3F_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Struct/eql_3F_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Struct/eql_3F_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Struct/eql_3F_i.dat