summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-07-11 17:17:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-07-11 17:17:14 +0000
commit4b5caf56fa16329bd9021b58f4fe1d848f4503fa (patch)
tree74ffdf11e4f5e272e410211feedc8015ae2c1821 /string.c
parent296957f19b45e2df8f38314fec63585909bf195d (diff)
downloadruby-4b5caf56fa16329bd9021b58f4fe1d848f4503fa.tar.gz
ruby-4b5caf56fa16329bd9021b58f4fe1d848f4503fa.tar.xz
ruby-4b5caf56fa16329bd9021b58f4fe1d848f4503fa.zip
* string.c (rb_str_match): fix for string match.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 9aeb7ef80..cba8d340c 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;
}