Sha256: df40e8c4f9f198e084bd4839a02ad21ae63dd66bf9fb9c09077b86f6eeb5597a

Contents?: true

Size: 1.19 KB

Versions: 12

Compression:

Stored size: 1.19 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:	hash:@docstringIC:YARD::Docstring"MProduce a hash based on the text and options of this regular expression.
:@objectu:YARD::StubProxyRegexp#hash:
@summary0:	@all"qProduce a hash based on the text and options of this regular expression.


@overload hash
  @return [Fixnum]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Regexp#hash;;;IC;	"
;
u;Regexp#hash;0;
"@return [Fixnum];[;[o:YARD::Tags::Tag
;
0;0:@types["Fixnum:
@text":@tag_name"return;0:@parameters[;0:@signature"	hash;"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["	re.c0:@namespaceu;Regexp:
@path"Regexp#hash;[:@visibility:public:@source"Ë/*
 * call-seq:
 *   rxp.hash   => fixnum
 *
 * Produce a hash based on the text and options of this regular expression.
 */

static VALUE
rb_reg_hash(re)
    VALUE re;
{
    int hashval, len;
    char *p;

    rb_reg_check(re);
    hashval = RREGEXP(re)->ptr->options;
    len = RREGEXP(re)->len;
    p  = RREGEXP(re)->str;
    while (len--) {
    hashval = hashval * 33 + *p++;
    }
    hashval = hashval + (hashval>>5);
    
    return INT2FIX(hashval);
}:@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/Regexp/hash_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Regexp/hash_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Regexp/hash_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Regexp/hash_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Regexp/hash_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Regexp/hash_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Regexp/hash_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Regexp/hash_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Regexp/hash_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Regexp/hash_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Regexp/hash_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Regexp/hash_i.dat