summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-08 20:21:14 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-08 20:21:14 +0000
commitf240fc637cb9d83463ae221c4294837c21f56395 (patch)
treea2b1e57fe70c0feb38b48f6b49716499de5cbae1 /re.c
parent2a255514a1262476147c4665d8fe87cd970bafb2 (diff)
* re.c (match_select): fix index references and make
MatchData#select actually work. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2344 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 b7603e0..d3abf09 100644
--- a/re.c
+++ b/re.c
@@ -841,7 +841,7 @@ match_select(argc, argv, match)
rb_ary_push(result, Qnil);
}
else {
- VALUE str = rb_str_new(ptr+regs->beg[i], regs->end[i]-regs->beg[i]);
+ VALUE str = rb_str_new(ptr+regs->beg[idx], regs->end[idx]-regs->beg[idx]);
if (taint) OBJ_TAINT(str);
rb_ary_push(result, str);
}