diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-13 19:31:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-13 19:31:42 +0000 |
commit | be0197054c8c9634f413bc472425a1a8650c77cd (patch) | |
tree | 5494c6af7777ca601d13c5ca24d910f9816b0570 /re.c | |
parent | 5d325e6a9e3d01a07191875b55f98496efb75e6e (diff) | |
download | bundler-be0197054c8c9634f413bc472425a1a8650c77cd.tar.gz |
* 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.c | 54 |
1 files changed, 27 insertions, 27 deletions
@@ -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)); |