* re.c (match_aref): fixed indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5d325e6a9e
commit
be0197054c
48
re.c
48
re.c
@ -1657,33 +1657,33 @@ match_aref(int argc, VALUE *argv, VALUE match)
|
|||||||
rb_scan_args(argc, argv, "11", &idx, &rest);
|
rb_scan_args(argc, argv, "11", &idx, &rest);
|
||||||
|
|
||||||
if (NIL_P(rest)) {
|
if (NIL_P(rest)) {
|
||||||
if (FIXNUM_P(idx)) {
|
if (FIXNUM_P(idx)) {
|
||||||
if (FIX2INT(idx) >= 0) {
|
if (FIX2INT(idx) >= 0) {
|
||||||
return rb_reg_nth_match(FIX2INT(idx), match);
|
return rb_reg_nth_match(FIX2INT(idx), match);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const char *p;
|
const char *p;
|
||||||
int num;
|
int num;
|
||||||
|
|
||||||
switch (TYPE(idx)) {
|
switch (TYPE(idx)) {
|
||||||
case T_SYMBOL:
|
case T_SYMBOL:
|
||||||
p = rb_id2name(SYM2ID(idx));
|
p = rb_id2name(SYM2ID(idx));
|
||||||
goto name_to_backref;
|
goto name_to_backref;
|
||||||
break;
|
break;
|
||||||
case T_STRING:
|
case T_STRING:
|
||||||
p = StringValuePtr(idx);
|
p = StringValuePtr(idx);
|
||||||
|
|
||||||
name_to_backref:
|
name_to_backref:
|
||||||
num = name_to_backref_number(RMATCH_REGS(match),
|
num = name_to_backref_number(RMATCH_REGS(match),
|
||||||
RMATCH(match)->regexp, p, p + strlen(p));
|
RMATCH(match)->regexp, p, p + strlen(p));
|
||||||
return rb_reg_nth_match(num, match);
|
return rb_reg_nth_match(num, match);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return rb_ary_aref(argc, argv, match_to_a(match));
|
return rb_ary_aref(argc, argv, match_to_a(match));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#define RUBY_VERSION "1.9.2"
|
#define RUBY_VERSION "1.9.2"
|
||||||
#define RUBY_RELEASE_DATE "2010-02-13"
|
#define RUBY_RELEASE_DATE "2010-02-14"
|
||||||
#define RUBY_PATCHLEVEL -1
|
#define RUBY_PATCHLEVEL -1
|
||||||
#define RUBY_BRANCH_NAME "trunk"
|
#define RUBY_BRANCH_NAME "trunk"
|
||||||
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
#define RUBY_VERSION_TEENY 1
|
#define RUBY_VERSION_TEENY 1
|
||||||
#define RUBY_RELEASE_YEAR 2010
|
#define RUBY_RELEASE_YEAR 2010
|
||||||
#define RUBY_RELEASE_MONTH 2
|
#define RUBY_RELEASE_MONTH 2
|
||||||
#define RUBY_RELEASE_DAY 13
|
#define RUBY_RELEASE_DAY 14
|
||||||
|
|
||||||
#include "ruby/version.h"
|
#include "ruby/version.h"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user