summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/string.c b/string.c
index 9aeb7ef800..cba8d340c5 100644
--- a/string.c
+++ b/string.c
@@ -973,7 +973,6 @@ static VALUE
rb_str_match(x, y)
VALUE x, y;
{
- VALUE reg;
long start;
switch (TYPE(y)) {
@@ -981,7 +980,7 @@ rb_str_match(x, y)
return rb_reg_match(y, x);
case T_STRING:
- start = rb_str_index(reg, x, 0);
+ start = rb_str_index(x, y, 0);
if (start == -1) {
return Qnil;
}