Sha256: 24fb0bb281a753d969e8c67659b753dec8454ee6cac84d72a269f97ab04aadce

Contents?: true

Size: 1.58 KB

Versions: 12

Compression:

Stored size: 1.58 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:
begin:@docstringIC:YARD::Docstring"�Returns the offset of the start of the <em>n</em>th element of the match
array in the string.

   m = /(.)(.)(\d+)(\d)/.match("THX1138.")
   m.begin(0)   #=> 1
   m.begin(2)   #=> 2
:@objectu:YARD::StubProxyMatchData#begin:
@summary0:	@all"�Returns the offset of the start of the <em>n</em>th element of the match
array in the string.

   m = /(.)(.)(\d+)(\d)/.match("THX1138.")
   m.begin(0)   #=> 1
   m.begin(2)   #=> 2


@overload begin(n)
  @return [Integer]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;MatchData#begin;;;IC;	"
;
u;MatchData#begin;0;
"@return [Integer];[;[o:YARD::Tags::Tag
;
0;0:@types["Integer:
@text":@tag_name"return;0:@parameters[[:n0;0:@signature"
begin(n);"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["	re.c0:@namespaceu;MatchData:
@path"MatchData#begin;[:@visibility:public:@source"W/*
 *  call-seq:
 *     mtch.begin(n)   => integer
 *  
 *  Returns the offset of the start of the <em>n</em>th element of the match
 *  array in the string.
 *     
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138.")
 *     m.begin(0)   #=> 1
 *     m.begin(2)   #=> 2
 */

static VALUE
match_begin(match, n)
    VALUE match, n;
{
    int i = NUM2INT(n);

    match_check(match);
    if (i < 0 || RMATCH(match)->regs->num_regs <= i)
    rb_raise(rb_eIndexError, "index %d out of matches", i);

    if (RMATCH(match)->regs->beg[i] < 0)
    return Qnil;

    return INT2FIX(RMATCH(match)->regs->beg[i]);
}:@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/MatchData/begin_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/MatchData/begin_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/MatchData/begin_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/MatchData/begin_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/MatchData/begin_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/MatchData/begin_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/MatchData/begin_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/MatchData/begin_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/MatchData/begin_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/MatchData/begin_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/MatchData/begin_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/MatchData/begin_i.dat