diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-08 20:21:14 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-08 20:21:14 +0000 |
commit | f240fc637cb9d83463ae221c4294837c21f56395 (patch) | |
tree | a2b1e57fe70c0feb38b48f6b49716499de5cbae1 /re.c | |
parent | 2a255514a1262476147c4665d8fe87cd970bafb2 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |