From ad9d3f96558c66efd49782fa14fc02de20035865 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 11 Jul 2002 17:17:14 +0000 Subject: * string.c (rb_str_match): fix for string match. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'string.c') 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; } -- cgit v1.2.3