Sha256: 5d6a579e212b000a61efa0c79f813b83819bb9683b04aea1d115df3e5772cbe0

Contents?: true

Size: 1.75 KB

Versions: 12

Compression:

Stored size: 1.75 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:=~:@docstringIC:YARD::Docstring"˙Returns a <code>MatchData</code> object describing the match, or
<code>nil</code> if there was no match. This is equivalent to retrieving the
value of the special variable <code>$~</code> following a normal match.

   /(.)(.)(.)/.match("abc")[2]   #=> "b"
:@objectu:YARD::StubProxyRegexp#=~:
@summary0:	@all"1Returns a <code>MatchData</code> object describing the match, or
<code>nil</code> if there was no match. This is equivalent to retrieving the
value of the special variable <code>$~</code> following a normal match.

   /(.)(.)(.)/.match("abc")[2]   #=> "b"


@overload match(str)
  @return [MatchData, nil]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Regexp#=~;:
match;IC;	"
;
u;Regexp#=~;0;
"@return [MatchData, nil];[;[o:YARD::Tags::Tag
;
0;0:@types["MatchData"nil:
@text":@tag_name"return;0:@parameters[[:str0;0:@signature"match(str);"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["	re.c0:@namespaceu;Regexp:
@path"Regexp#=~;[:@visibility:public:@source"p/*
 *  call-seq:
 *     rxp.match(str)   => matchdata or nil
 *  
 *  Returns a <code>MatchData</code> object describing the match, or
 *  <code>nil</code> if there was no match. This is equivalent to retrieving the
 *  value of the special variable <code>$~</code> following a normal match.
 *     
 *     /(.)(.)(.)/.match("abc")[2]   #=> "b"
 */

VALUE
rb_reg_match(re, str)
    VALUE re, str;
{
    long start;

    if (NIL_P(str)) {
    rb_backref_set(Qnil);
    return Qnil;
    }
    StringValue(str);
    start = rb_reg_search(re, str, 0, 0);
    if (start < 0) {
    return Qnil;
    }
    return LONG2FIX(start);
}:@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/_3D_7E_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Regexp/_3D_7E_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Regexp/_3D_7E_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Regexp/_3D_7E_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Regexp/_3D_7E_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Regexp/_3D_7E_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Regexp/_3D_7E_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Regexp/_3D_7E_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Regexp/_3D_7E_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Regexp/_3D_7E_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Regexp/_3D_7E_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Regexp/_3D_7E_i.dat