mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
bc8d214f76
commit
ad9d3f9655
2 changed files with 5 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri Jul 12 02:15:58 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* string.c (rb_str_match): fix for string match.
|
||||
|
||||
Fri Jul 12 00:02:50 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* ext/stringio/stringio.c (strio_gets_internal): fixed for record
|
||||
|
|
3
string.c
3
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue