summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-13 19:31:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-13 19:31:42 +0000
commitbe0197054c8c9634f413bc472425a1a8650c77cd (patch)
tree5494c6af7777ca601d13c5ca24d910f9816b0570 /re.c
parent5d325e6a9e3d01a07191875b55f98496efb75e6e (diff)
* re.c (match_aref): fixed indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/re.c b/re.c
index 0f8ff7a..24b3435 100644
--- a/re.c
+++ b/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;
-
- 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;
-
- default:
- break;
- }
- }
+ 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);
+
+ 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;
+ }
+ }
}
return rb_ary_aref(argc, argv, match_to_a(match));