summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-02-03 10:02:57 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-02-03 10:02:57 +0000
commit01bb9da7acfeb868eeec4fc20061c57d85b26cf8 (patch)
tree9b0ef258786fb82863ed752fc410405f86ac2068 /re.c
parentde0e5e35ae39a03879d8a954dd6b75654c173cd7 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@63 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index 83fb94afb1..41f5ff887b 100644
--- a/re.c
+++ b/re.c
@@ -570,7 +570,7 @@ match_to_a(match)
int i;
for (i=0; i<regs->num_regs; i++) {
- if (regs->beg[0] == -1) ary_push(ary, Qnil);
+ if (regs->beg[i] == -1) ary_push(ary, Qnil);
else ary_push(ary, str_new(ptr+regs->beg[i],
regs->end[i]-regs->beg[i]));
}