mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
2 changed files with 26 additions and 26 deletions
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);
|
||||
|
||||
if (NIL_P(rest)) {
|
||||
if (FIXNUM_P(idx)) {
|
||||
if (FIX2INT(idx) >= 0) {
|
||||
return rb_reg_nth_match(FIX2INT(idx), match);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const char *p;
|
||||
int num;
|
||||
if (FIXNUM_P(idx)) {
|
||||
if (FIX2INT(idx) >= 0) {
|
||||
return rb_reg_nth_match(FIX2INT(idx), match);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const char *p;
|
||||
int num;
|
||||
|
||||
switch (TYPE(idx)) {
|
||||
case T_SYMBOL:
|
||||
p = rb_id2name(SYM2ID(idx));
|
||||
goto name_to_backref;
|
||||
break;
|
||||
case T_STRING:
|
||||
p = StringValuePtr(idx);
|
||||
switch (TYPE(idx)) {
|
||||
case T_SYMBOL:
|
||||
p = rb_id2name(SYM2ID(idx));
|
||||
goto name_to_backref;
|
||||
break;
|
||||
case T_STRING:
|
||||
p = StringValuePtr(idx);
|
||||
|
||||
name_to_backref:
|
||||
num = name_to_backref_number(RMATCH_REGS(match),
|
||||
RMATCH(match)->regexp, p, p + strlen(p));
|
||||
return rb_reg_nth_match(num, match);
|
||||
break;
|
||||
name_to_backref:
|
||||
num = name_to_backref_number(RMATCH_REGS(match),
|
||||
RMATCH(match)->regexp, p, p + strlen(p));
|
||||
return rb_reg_nth_match(num, match);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rb_ary_aref(argc, argv, match_to_a(match));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#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_BRANCH_NAME "trunk"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
#define RUBY_VERSION_TEENY 1
|
||||
#define RUBY_RELEASE_YEAR 2010
|
||||
#define RUBY_RELEASE_MONTH 2
|
||||
#define RUBY_RELEASE_DAY 13
|
||||
#define RUBY_RELEASE_DAY 14
|
||||
|
||||
#include "ruby/version.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue